Configuration Information [Automatically generated, do not change]: Machine: i386 OS: linux-gnu Compiler: i386-redhat-linux-gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i386-redhat-linux-gnu' -DCONF_VENDOR='redhat' -DSHELL -DHAVE_CONFIG_H -I. -I. -I./include -I./lib -D_FILE_OFFSET_BITS=64 -O2 -g -pipe -march=i386 -mcpu=i686 uname output: Linux FC1-zalmoxe 2.4.30 #1 SMP Tue May 3 15:29:16 EEST 2005 i686 i686 i386 GNU/Linux Machine Type: i386-redhat-linux-gnu
Bash Version: 2.05b Patch Level: 0 Release Status: release Description: getopts builtin command problem when parameters lack Repeat-By: While trying to use getopts builtin bash command I encountered the following problem: Test script: #!/bin/sh (/bin/bash) getopts ":xy" X echo $X The output for this script , ran without parameters is : Fedora Core 1 [EMAIL PROTECTED] root]# sh script a [EMAIL PROTECTED] root]# sh script -t a [EMAIL PROTECTED] root]# sh script -x x [EMAIL PROTECTED] root]# Fedora Core 2 [EMAIL PROTECTED] root]# sh script a f [EMAIL PROTECTED] root]# sh script -t a f [EMAIL PROTECTED] root]# sh script -x x [EMAIL PROTECTED] root]# According to the man page it should return `?' (question mark). Tests were also performed on Debian and Slackware distributions and the results were as expected. (OK) If there is something that I should've known, please let me know. Chris. _______________________________________________ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash