Re: How to using getopt in aix



2007-05-4, 01:15(-07), moonhk:
On 5??4??, ?U??3??42??, Stephane CHAZELAS <this.addr...@xxxxxxxxxx> wrote:
Use getopts instead, see man getopts, or man sh.getoptis
deprecated and have some flaws.
[...]
How to fix below warning message ?

It's not a warning message, it's an error message. You told
getopts that -l expected an argument (l:), end you didn't
provide any.

Neither getopt nor getopts support options with optional
arguments. See http://stchaz.free.fr/getopts_long.sh for an
alternative getopts with support for optional arguments (then
you need to specify the arguement as -larg or --long=arg)

xbatjob.ksh -d dd -l
xbatjob.ksh[28]: getopts: 0403-004 Specify a parameter with this
command.
DB=dd
LD=
BATCHID=
help



--
Stéphane
.