Re: a command "spool", ie queueing commands?
am 04.08.2005 13:16:12 von Glynn Clementsurgrue wrote:
> > You could try something like:
> >
> > $ command1 && command2 && command3
>
> Better would be command1 ; command2 ; command3, because then it won't
> depend on the previous command coming out true.
Well, whether or not it's better depends upon whether you want to
conditionalise execution of one command upon success of the previous
command.
I find it far more common for scripts to use ";" when they really
should have used "&&" than the converse. A particularly common case
is "cd foo ; dosomething"; this should almost always be using "&&".
--
Glynn Clements
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html