[wplug] background

billings at negate.org billings at negate.org
Tue May 20 15:25:24 EDT 2003


Depending on the shell, you'd get different behavior, but both would be
wrong.

What you probably want to do is

test.sh > test.log &

If you're curious as to what your command does, it just runs test.sh in
the background, putting the output to STDOUT.  Then it runs the command
"> test.log".  In bash, that just creates a file with nothing from
stdin.  In csh, you'll get an Invalid null command error for improperly
using >.

Also, in bash, &> is used for redirecting STDERR, and is completely
different from & >.

I think that > is a builtin, that's why it behaves differently.



On Tue, 2003-05-20 at 15:10, Chris wrote:
> Say that I have a script that I want to run in that background and redirect
> it's output.  Would I do this?
> 
> # test.sh& > test.log
> 
> Chris Romano
> 
> _______________________________________________
> wplug mailing list
> wplug at wplug.org
> http://www.wplug.org/mailman/listinfo/wplug
-- 
Jonathan S Billings <billings at negate.org>
TSFNKP



More information about the wplug mailing list