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
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
--- 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
> 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
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
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
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/
--
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
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
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
10 matches
Mail list logo