Elfyn,
If you looker more closely, you'll see that Sören already knows about the
$? variable.
Randall Schulz
At 14:51 2002-12-20, Elfyn McBratney wrote:
Hello Soren,
What you need is the $? variable. The simplest testcase would be this:
>>> rt.c
int
main()
{
return(21);
}
<<<
[root@webd
Hello Soren,
What you need is the $? variable. The simplest testcase would be this:
>>> rt.c
int
main()
{
return(21);
}
<<<
[root@webdev]:{509}:% gcc rt.c -o rt
[root@webdev]:{510}:% ./rt
[root@webdev]:{511}:% echo $?
21
[root@webdev]:{512}:%
Elfyn
[EMAIL PROTECTED]
--- Soren A <
Soren A <[EMAIL PROTECTED]> wrote:
> Does anyone know how to do this -- how to pull out a return value
> from a command in the middle of a pipeline?
Bash has a builtin array variable PIPESTATUS.
There are also some horrible file descriptor manipulation recipes out there
for other shells, if you
Sören,
If you wrote all that yourself, I can't say you look like a BASH newbie.
Then again, there's that "too clever by half" thing...
As an aside, I find "export NAME=value" to be clearer than "declare -x
NAME=value", but that's just opinion.
As to your problem, first of all, you're only cap
Hallo Cygwains,
[Heck, I dunno... "Cygwinauts"?].
I have a possibly OT question, that is, a bash shell question. Lacking
the insight into the deepest reaches of shell-ology, I have come up
empty on all attempts to solve this one for myself. (Those attempts have
included doing `info bash' and read
5 matches
Mail list logo