Understanding the Bourne Shell (was Re: Finding the last arg)

Eric Gisin eric at mks.com
Tue Jan 8 14:29:45 AEST 1991


The shell's interpretation of newline is context sensitive.
It is usually equivalent to ";", but in a few cases it
is equivalent to white-space (space or tab). The latter cases
include after "|", "&&", "||", "for NAME", and "case WORD".

So all the following are valid:
$ ls |
> wc
$ true &&
> false ||
> maybe
$ for x
> in a b c
> do :
> done
$ case x
> in x) echo x!		# ;; optional here
> esac



More information about the Comp.unix.shell mailing list