tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* SUMMARY: Problems with Bourne Shell and getopts
@ 1999-01-10  2:09 Richard Sharpe
  0 siblings, 0 replies; only message in thread
From: Richard Sharpe @ 1999-01-10  2:09 UTC (permalink / raw)
  To: tru64-unix-managers

Don't know whether or not this justifies a summary, but here goes.

I asked:

> I have seen reports that suggest that the Bourne shell under Digital UNIX
> has problems with $OPTIND when using getopt.
> 
> When I last looked, there seemed to be a problem if there are no command
> line parameters to a shell, $OPTIND seems undefined.
> 
> However, reports I have seen suggest that $OPTIND may be undefined in all
> cases.

Thanks to Tom Blinn and Charles Richmond, and some experimentation, I found
that indeed, getopts is not well supported in sh under DU.

Tom pointed out that under DU 4.0 and later, sh has two versions. One (the
better one) is POSIX/XPG4 compatible and supports what I want.  The older
one does not.

ksh supports everything I need.  Now to see how to rectify the problem.

Under DU, ksh seems to be /usr/bin/posix/sh, which is the POSIX/XPG4 sh.



Regards
-------
Richard Sharpe, sharpe@ns.aus.com, NIC-Handle:RJS96
NS Computer Software and Services P/L, 
Ph: +61-8-8281-0063, FAX: +61-8-8250-2080, 
Samba, Linux, Apache, Digital UNIX, AIX, Netscape, Stronghold, C, ...

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1999-01-10  2:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-01-10  2:09 SUMMARY: Problems with Bourne Shell and getopts Richard Sharpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox