First off, inside your perl script add some statements showing the result of the command; a quick-and-dirty way would be:
Then, assuming that alone doesn't produce any useful diagnostic information, try modifying your shell script on the remote server to be a bit noisier:use Data::Dumper; my $cmd = Generate_Command($arg1,$arg2); print Dumper([$ssh->cmd($cmd)]); $cmd = Generate_Another_Command($arg1,$arg2); print Dumper([$ssh->cmd($cmd)]);
I strongly suspect that the combination of these two changes will show that something else is going on, if the answer isn't apparent as soon as you make the first perl change above.#! /bin/sh set -x CLASSPATH=/usr/local/classes/classes12.zip PATH=/usr/local/java/bin:$PATH LD_LIBRARY_PATH=/usr/local/tonga/lib export CLASSPATH export PATH export LD_LIBRARY_PATH echo "About to start java at `date`" /usr/local/tonga/bin/javadb dbVersion $1 javastat=$? echo "Finished java at `date` with status $javastat" exit $javastat
-- @/=map{[/./g]}qw/.h_nJ Xapou cets krht ele_ r_ra/; map{y/X_/\n /;print}map{pop@$_}@/for@/
In reply to Re: How to hold execution of perl script while it runs command on remote machine
by fizbin
in thread How to hold execution of perl script while it runs command on remote machine
by linuxfan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |