[plug] Bash "Processing" Script

Russell Steicke r.steicke at bom.gov.au
Fri Jun 11 12:52:54 WST 2004


On Fri, Jun 11, 2004 at 12:39:04PM +0800, James Devenish wrote:
> In message <20040611043318.GA11731 at postoffice.wa.bom.gov.au>
> on Fri, Jun 11, 2004 at 12:33:18PM +0800, Russell Steicke wrote:
> > On Fri, Jun 11, 2004 at 12:02:37PM +0800, Jay Turner wrote:
> >   while true ; do
> 
> Point of trivia, with reference to one of Jay's earlier e-mails: the
> 'while true ; do' should be functionally equivalent to 'while : ; do'.

And slightly quicker, since : is a shell builtin.

> > Plus you don't need to run dd background, so you don't miss out on
> > error messages like you do with the solutions that to ">/dev/null
> > 2>&1".
> 
> Good idea. But while I don't dispute the merits of running in the
> foreground, why do you associate "background" with ">/dev/null 2>&1"?

Umm, I don't.  That was a slip.  This:

  foo >/dev/null 2>&1 &

seems fairly common when people want to run something asynchronously and
not have the terminal bothered with messages.  But I don't like the idea
of completely ignoring error messages from a process, which is the point
of what I said (was trying to say), and is also the reason I'd prefer to
run dd synchronously.





-- 
Russell Steicke

-- Fortune says:
Anybody who doesn't cut his speed at the sight of a police car is
probably parked.



More information about the plug mailing list