Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: Regionalfernsehen Kuessnacht <rfk@geocities.com>
Subject: getopts does not work in a shell script
Date: 1998/08/27	[thread overview]
Message-ID: <35E51F9E.80F9DD04@nospam.ethz.ch> (raw)

Hi

I tried to use the getopts command to process options in a shell script,

without success. The options processing works as follows:
#!/bin/sh
while getopts fdi opt
do
    case $opt in
        'f') echo full ;;
        'd') echo differential ;;
        'i') echo incremental ;;
        '?') echo options: [-fdi]
         exit 2 ;;
        esac
done
I tried the same script also on a sun with unix. It works correctly
there,
but not on the DEC. Please help.
Thank you.

    Tom

__________________________________________________________
To avoid spam I replaced my email addres.
Replace 'nospam' with 'ife.ee' to send me a mail




             reply	other threads:[~1998-08-27  4:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-08-27  4:00 Regionalfernsehen Kuessnacht [this message]
1998-08-27  4:00 ` getopts does not work in a shell script Bob Harris
1998-08-27  4:00 ` Wolfram Klaus
read-only archive

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