LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-18-2013, 05:12 PM   #1
cparky2
LQ Newbie
 
Registered: Mar 2013
Posts: 3

Rep: Reputation: Disabled
Please Explain This Sript, I Want to Use a Variation With my Own Project


If i have Asterisk installed on a virtual machine, since Asterisk is based on Linux I was hoping to use a variant of the undernoted script. How would I get it to work on the asterisk.vmx file? Thanks in advance...

// This sample runs grep and extracts all the lines that match
// the line "miguel" from /etc/passwd
using System;
using System.Diagnostics;

class Test
{
public static void Main ()
{
ProcessStartInfo psi = new ProcessStartInfo ();
psi.FileName = "grep";
psi.Arguments = "miguel /etc/passwd";
psi.RedirectStandardOutput = true;
psi.UseShellExecute = false;

Process p = Process.Start (psi);
string ret = p.StandardOutput.ReadToEnd ();
p.WaitForExit ();

Console.WriteLine (ret);
}
}
\
 
Old 03-18-2013, 08:30 PM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 650Reputation: 650Reputation: 650Reputation: 650Reputation: 650Reputation: 650
It won't run on a .vmx file, these just describe a virtual machines configuration. If you mean to extract the information from a virtual machine then you'll need tools to mount the .vmdk file then search through the mounted filesystem.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sript to delete older logs in a FS madhumithamohan Linux - Newbie 3 05-18-2012 07:12 AM
Can someone please explain the GNU Project in Layman's terms please? sharee Linux - Newbie 6 04-03-2010 11:02 PM
Stuck on sript to scp a file nazs Programming 10 04-24-2007 07:19 PM
need shell backup sript maxut Linux - Software 2 10-12-2004 11:54 AM
execute sript? cloids Linux - Software 1 01-15-2004 02:03 PM


All times are GMT -5. The time now is 05:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration