You are not logged in.
Pages: 1
Hey guys. I'm having troubles with return values by shell.
Expect the following command (out of perl):
$sshcommand = sprintf ("ssh %s \". ./.profile && wsetemsg -t %s cUser %s 2>&1 && wsetemsg administrator=%s cUser %s\"", $usr_server, "ACK", $origid, $$row[4], $origid);
$rv = `$sshcommand`
Now, as you can see i connected two commands, usin && calling by ssh. That's nothing very uncommon.
Anyway, the problem is the return value. I'm used to shift values by 8, like
$rc = $? >> 8;
In this case, when connecting two commands (rather 3, but just two have return values, what's the two wsetemsg, which both return 128, or 0 after shifting for 8), by shifting by 8 i get the 16777215 back as a return.
What does the shell do with those values on connect? Merging? Calculating?
I'd be thankful for any advice.
Yours,
Georg
Last edited by STiAT (2007-06-11 13:33:18)
Ability is nothing without opportunity.
Offline
Pages: 1