Re: [pdksh]getopts problem in conjunction with shift

2005-01-03 Thread Igor Pechtchanski
On Sun, 2 Jan 2005, Kenneth Stephen wrote: > Hi, > > I have the following script (a.ksh) : > > $ cat a.ksh > #!/usr/bin/ksh -x > > echo $* > getopts abc var > > echo $? > echo $var > echo $OPTIND > echo $OPTARG > > shift > > echo $* > getopts abc var > > echo $? > echo $var > echo $OPTIND > ec

[pdksh]getopts problem in conjunction with shift

2005-01-02 Thread Kenneth Stephen
Hi, I have the following script (a.ksh) : $ cat a.ksh #!/usr/bin/ksh -x echo $* getopts abc var echo $? echo $var echo $OPTIND echo $OPTARG shift echo $* getopts abc var echo $? echo $var echo $OPTIND echo $OPTARG When run on AIX ksh, it produces the following (expected output) : $