Ultrix 4.0 bourne shell scripting

Bob Debula bobd at hpuxa.ircc.ohio-state.edu
Tue Aug 7 23:34:28 AEST 1990


I just started working with Ultrix 4.0 a few days ago.  This morning,
I tried to port a couple of Bourne shell scripts over and got:

sh: bad substitution

for the line:  grep ${1:-":"} /etc/passwd


I then tried just "-" in the above construct
in place of ":-" and everything worked fine.  I am porting stuff
from the HP-UX environment and thought that the syntax rules
for the Bourne shell were more or less universal.  Is this an
Ultrix peculiarity (and why did they decide not to support
the ":" form) ? 

==========================================================================
Bob DeBula                    | Internet:   bobd at hpuxa.ircc.ohio-state.edu
The Ohio State University     | Disclaimer: These are my views, not the U's
Davros sez:   When my Daleks compute they use X-TER-MI-NALS!



More information about the Comp.unix.ultrix mailing list