ams7503
asked on
Perl -ssh- Illegal seek
Hi ;
I have a perl script that does a whole bunch of stuff and at the end ssh's to a remote server and runs a script from there.
It looks like it is correctly ssh and running the commands.However, I get a Illegal Seek error- what does this mean?
This is how I ssh and run the cmds
`ssh -v -C root@sigma.com "cd $dbpath/setup;source setenv.sh;cd../scripts; ./export_data.sh"` or die "Can not run ssh $!\n";
What does illegal seek mean?
I have a perl script that does a whole bunch of stuff and at the end ssh's to a remote server and runs a script from there.
It looks like it is correctly ssh and running the commands.However, I get a Illegal Seek error- what does this mean?
This is how I ssh and run the cmds
`ssh -v -C root@sigma.com "cd $dbpath/setup;source setenv.sh;cd../scripts; ./export_data.sh"` or die "Can not run ssh $!\n";
What does illegal seek mean?
I think the system call is returning non 0, but you are looking for 0 on succeds on success r die. Try this:
$command = q{ssh -v -C root@sigma.com "cd $dbpath/setup;source setenv.sh;cd../scripts; ./export_data.sh"};
$return_code = system($command);
# check return_code to see what defines success or failure.
$command = q{ssh -v -C root@sigma.com "cd $dbpath/setup;source setenv.sh;cd../scripts; ./export_data.sh"};
$return_code = system($command);
# check return_code to see what defines success or failure.
Are you getting "Can not run ssh illegal seek"?
the or will happen when the `` returns "0" or ""
and $! will be whatever happened to be left in $! from earlier
the or will happen when the `` returns "0" or ""
and $! will be whatever happened to be left in $! from earlier
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
- the script runs fine without any problems