[BusyBox] hush progress
Larry Doolittle
ldoolitt at recycle.lbl.gov
Wed May 2 12:50:12 UTC 2001
Matt discovered:
> The problem is that the $(...) and `...` operators do not strip
> the trailing newline.
> I just committed a patch to fix this. It will only process the
> newline as a command separator if the end_trigger is not '\0'.
> This fixes the above case, and I believe some problems with $
> substitutions as well.
Cool. Looks good so far. Erik kept telling me it would be helpful
to have hush put in CVS. I see now he was right!
My next test cases _sort_of_ work:
$ echo THIS IS A TEST >foo
$ cat foo | if true; then tr 'A-Z' 'a-z'; else echo bar; fi
this is a test
sh: tcsetpgrp: Invalid argument
sh: waitpid: Invalid argument
$ cat foo | if false; then tr 'A-Z' 'a-z'; else echo bar; fi
bar
sh: tcsetpgrp: Invalid argument
sh: waitpid: Invalid argument
$ if true; then tr 'A-Z' 'a-z'; else echo bar; fi <foo
this is a test
sh: waitpid: Inappropriate ioctl for device
$ if false; then tr 'A-Z' 'a-z'; else echo bar; fi <foo
bar
sh: waitpid: Inappropriate ioctl for device
$
Does this start to interact with Erik's job control work?
- Larry
More information about the busybox
mailing list