On Mon, 27 Nov 2000, Cameron Simpson wrote:
> On Sat, Nov 25, 2000 at 04:31:23PM -0700, SoloCDM <[EMAIL PROTECTED]> wrote:
> | I'm trying to force commands following each other in a script to
> | execute one at a time once the preceding command has finished.
>
> But this is the _normal_ behaviour!
>
> command1
> command2
> command3
>
> will execute in sequence.
>
> | I applied the command nice with the options to a list of commands and
> | didn't get the results I was seeking.
>
Perhaps what SoloCDM really wanted was to execute the command only if the
original command succeeded, in which case you'd want:
command1 && command2 && command3
assuming the shell is /bin/sh or /bin/bash.
In order to nice those processes, you'd have to tell the shell you meant
all of them:
nice /bin/sh -c "command1 && command2 && command3"
or make it a shell script (which is essentially what the above does).
HTH,
Bill Carlson
--
Systems Programmer [EMAIL PROTECTED] | Opinions are mine,
Virtual Hospital http://www.vh.org/ | not my employer's.
University of Iowa Hospitals and Clinics |
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list