<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
yes already noted by Steve, thanks. <br>
<br>
I should have spotted that myself straight away but I was too wrapped
up in this whole "I didn't realise there were 2 sets of numbers" thing,
gotta go read some unix programming books it would seem this is a os
function that I am not aware of. <br>
<br>
I still reserve the right to be annoyed at commands for not hiding this
from me like everything else, but then </F> is right (as always
it would seem) I should not be using such a deprecated thing like
commands, I will switch to subprocess...<br>
<br>
I'm even more surprised since I do so much shell scripting and I've
never even heard of this thing before, I guess only the really
battle-scarred old skool ones may know of it.<br>
<br>
-h<br>
<pre class="moz-signature" cols="72">Hari Sekhon</pre>
<br>
<br>
Scott David Daniels wrote:
<blockquote cite="mid4521456d$1@nntp0.pdx.net" type="cite">
<pre wrap="">Steve Holden wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hari Sekhon wrote:
</pre>
<blockquote type="cite">
<pre wrap="">I'm running a command like
import commands
result = commands.getstatusoutput('somecommand')
print result[0]
3072
</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->...
</pre>
<blockquote type="cite">
<pre wrap="">No, it's just returning the error code in the top half of a sixteen-bit
value. You will notice that 3072 == 2 * 256.
</pre>
</blockquote>
<pre wrap=""><!---->For the rest of us playing along at home, there is a typo there:
The preceding line should read:
> value. You will notice that 3072 == 12 * 256.
--Scott David Daniels
<a class="moz-txt-link-abbreviated" href="mailto:scott.daniels@acm.org">scott.daniels@acm.org</a>
</pre>
</blockquote>
</body>
</html>