[BusyBox] ASH and redirection...
Thomas Cameron
tom at patcameron.ne.mediaone.net
Wed Feb 6 16:20:06 UTC 2002
Hello all,
I have recently resumed development on one of my project systems,
and have started to write some shell scripts. These scripts use
connemds as such:
echo "foo" > /dev/null 2>&1
If the command succeeds or fails, I should not get any output to the
console (correct me if I'm wrong). I should then be able to execute
`echo $?`, and get "0" returned to me, so I can check the exit code of
the previously executed program.
The problem that I'm having is that when I execute a nonexistant
command, ash still dumps "command:No such file or directory" to the
console. Obviously, this is a problem if I'm trying to format the
output through the script. Is this the way things are suposed to work?
Does bash deviate from an agreed upon standard, so as not to output the
errors? If anyone knows any information about this, please let me know.
Thanks in advance!
-Tom Cameron
P.S. I am using the BB snapshot of the stable tree from January 05,
2002.
More information about the busybox
mailing list