Re: unix commands

2007-09-20 Thread John W. Krahn
lerameur wrote: Hello, Hello, I want to write a perl script that invokes unix command. perldoc -f qx perldoc -f system perldoc -f fork perldoc -f exec perldoc -f open perldoc perlipc perldoc perlopentut perldoc IPC::Open2 perldoc IPC::Open3 perldoc IPC::Run perldoc Expect perldoc Shell

RE: unix commands

2007-09-20 Thread Andrew Curry
Think you mean foreground or background. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 20 September 2007 15:59 To: lerameur; beginners@perl.org Subject: Re: unix commands --- lerameur <[EMAIL PROTECTED]> wrote: > Hello, > > I want to writ

Re: unix commands

2007-09-20 Thread useperl-jeff
--- lerameur <[EMAIL PROTECTED]> wrote: > Hello, > > I want to write a perl script that invokes unix command. Some of the > command can take a long time to process, I have many commands I want > to invoke. Lets say the first command can take one minute to > process, how can I make sure the se

Re: Unix commands in Perl scripts

2002-02-21 Thread Jonathan E. Paton
> Hi guys, > > I was wondering if anyone knows how to execute Unix > commands in a Perl Script? system(echo Hello World); my $output = qx(echo Hello There); print "The shell said :$output\n"; perldoc -f system perldoc perlop Jonathan Paton __ Do

Re: Unix commands in Perl scripts

2002-02-20 Thread Paresh Kakrecha
system( "cat myfile"); or qx( cp file1 file2); At 03:16 PM 2/20/2002 -0800, John W. Krahn wrote: >Tony Ho wrote: > > > > Hi guys > >Hello, > > > I was wondering if anyone knows how to execute Unix commands in a Perl > > Script ? > > >use Shell; > >my $ps = ps( 'ax' ); >print $ps; > >my @ls = ls

Re: Unix commands in Perl scripts

2002-02-20 Thread John W. Krahn
Tony Ho wrote: > > Hi guys Hello, > I was wondering if anyone knows how to execute Unix commands in a Perl > Script ? use Shell; my $ps = ps( 'ax' ); print $ps; my @ls = ls( '-al' ); print $ls[ 7 ]; perldoc Shell John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL

RE: Unix commands in Perl scripts

2002-02-20 Thread Brett W. McCoy
On Wed, 20 Feb 2002, Booher Timothy B 1stLt AFRL/MNAC wrote: > You simply enclose your unix commands in ''. > > i.e. > > #!untested > > 'ls -la' I think you mean ` `, (backticks), right? -- Brett http://www.chapelperilous.net/ --

RE: Unix commands in Perl scripts

2002-02-20 Thread Booher Timothy B 1stLt AFRL/MNAC
Tony, You simply enclose your unix commands in ''. i.e. #!untested 'ls -la' tim Timothy B Booher, Lt USAF Research Engineer AFRL/MNAC 101 W. Eglin Blvd. Eglin AFB, FL 32542-6810 Telephone: 850-882-8302 ext. 3360 Fax: 850-882-2201

Re: Unix commands in Perl scripts

2002-02-20 Thread William.Ampeh
If I understood your question, you could use "system" or "command ticks". That is: system("cal") //be careful or $a = `cal`; depending on how you want to treat the output. If you want to manipulate the output, use command ticks. __ William Ampeh (x3939) Federal Reser

RE: Unix commands in Perl scripts

2002-02-20 Thread Michael Pastore
Tony, Here's an example calling a .exe not in UNIX though...might help.. @args = ($SysPath."JFMERGE",$MDFPath.$MDFName,$WorkPath.$FName,"-afxon","-axpson","- aitcon","-aii".$INIPath."jfmerge.ini","-all".$INIPath."jfserver.log","-z".$P DFPath.$PDFName); The second argument JFMERGE is a .exe Reg