Use backticks.
$result = `some command`;
system() on the other hand returns the exit status code.
$exit_code = system('some command');
...Or...
if (system('some command') != 0) {
print "Failed!";
}
Rob
-----Original Message-----
From: Imtiaz Ahmad [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 28, 2003 4:48 PM
To: [EMAIL PROTECTED]
Subject: system call
Hi-
Can someone please tell me how do I modify following line so that the result
gets stored in the var.
$count = system("$command $archive_dir | $grep_command -c $string1") ;
thanks.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]