Should shell command errors abandon subsequent commands?

Don Stanwyck stanwyck at ihuxr.UUCP
Fri Jul 27 05:05:54 AEST 1984


Response to letter From: idallen at watmath.UUCP
> Consider the following set of shell (any shell) commands and give me
> your opinion on what the best, ideal, most friendly behaviour would be:
>    1.  nosuchcommand ; echo "Is this executed?"
>    2.  ( nosuchcommand ; cmd ) ; echo "Is this executed?"
>    3.  echo `nosuchcommand` "Is this executed?"
>    4.  cmd nosuchglob* ; echo "Is this executed?"
> Tell me what you think should ideally happen A) in interactive use at a
> terminald and B) inside a shell file.  Does it make any difference
> whether or not the commands are shell built-ins?  In a shell file,
> would it make any difference if the commands were on separate lines?

Obviously the author of the above lines expects the echo to be executed.
If [s]he didn't, [s]he would have used || or && instead of the ;. 
-- 
 ________
 (      )					Don Stanwyck
@( o  o )@					312-979-3062
 (  ||  )					Cornet-367-3062
 ( \__/ )					ihnp4!ihuxr!stanwyck
 (______)					Bell Labs @ Naperville, IL



More information about the Comp.unix.wizards mailing list