[comp.unix.questions] How standard is "shift n" in sh

pcl@robots.ox.ac.uk (Paul Leyland) (03/08/91)

The following query arose here when a shell script was found to
execute differently on a Sun and a Convex.

Under SunOS 4.0 sh(1), the shift operator can take an optional
numerical parameter (default 1), which specifies how many arguments
are to be shifted away.

On the Convex, any argument is silently ignored and a single shift
performed.

Clearly, omitting the argument is safe on both architectures and has
the same behaviour, so this is the (presently) correct way to write
scripts.

The question is: which is the _de facto_ "standard" behaviour?
Should we be asking Convex to come into line, or should we flag Sun's
action as unportable?