in reply to One liner to test existance of a file
Your code is not valid Perl code. Your snippet does not even run in your shell. See perlrun.
Also, double quotes will be interpolated by Perl first. So your shell snippet won't look like you want. Do the following to see what goes wrong:
my $snippet = "perl -e /.firstboot | echo $?"; print "Running <$snippet>\n"; my $stat = $ssh->exec("perl -e /.firstboot | echo $?");
Also, why do you want to launch Perl on the remote end, when the unix shells have test to test for the existence of a file?
Also see Filesys::Virtual::SSH
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: One liner to test existance of a file
by kamal (Sexton) on Jul 14, 2010 at 20:22 UTC |