From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,5b69affb39c28736,start X-Google-Attributes: gidfee84,public From: Regionalfernsehen Kuessnacht Subject: getopts does not work in a shell script Date: 1998/08/27 Message-ID: <35E51F9E.80F9DD04@nospam.ethz.ch>#1/1 X-Deja-AN: 385214118 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii X-Trace: 27 Aug 1998 10:58:06 +0100, 129.132.24.198 Organization: Swiss Federal Institute of Technology (ETHZ) MIME-Version: 1.0 Newsgroups: comp.unix.osf.osf1 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