go ahead... be a heretic | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
The output of any our product command (like ebs --version) cannot be stored in a variable/file. (But same works fine if it’s a system command like date, ls etc on linux m/c). Is there way out to store this output into any file/variable? Below is the code in perl and it worked if the $command = ls but doesn’t work if the $command = “ebs --version”. Can you please give some input on this?
Script is as follows…
$command = ls; my $test = "/usr/anil/scripts/anil1.txt"; open (STDOUT, "> $test"); $t = system("$command"); In reply to Output of a command by Niel
|
|