While implementing `-w` for the `ls` command, I coded it so that the command would fail if the user tried to pass a negative value. I wanted to test the return code with a negative argument but could not make it work. I am not great at Bash. If anyone can tell me what I was doing wrong, I would appreciate it.
``` testing "with -w - Fail on negative" \ "$IN && ls -w -5 > /dev/null; echo $? && $OUT" \ "1" "" "" ``` The command would fail and return 1 but, in testing it would always write zero to the file. ~Andrew _______________________________________________ Toybox mailing list [email protected] http://lists.landley.net/listinfo.cgi/toybox-landley.net
