Accueil

CPU_SET
INFINITY
MB_CUR_MAX
MB_LEN_MAX
__setfpucw
_exit
_syscall
a64l
abort
abs
accept
access
acct
acos
acosh
addpart
addseverity
adduser
adjtime
adjtimex
aio_cancel
aio_error
aio_fsync
aio_read
aio_return
aio_suspend
aio_write
alarm
alloc_hugepages
alloca
apropos
arch
arch_prctl
argz_add
armscii-8
arp
ascii
asin
asinh
asprintf
assert
assert_perror
at
atan
atan2
atanh
atd
atexit
atof
atoi
atq
atrm
atrun
backend-spec
backtrace
basename
bash
bashbug
batch
bcmp
bcopy
bdflush
bind
bindresvport
blockdev
boot
bootlogd
bootparam
bosskill
brk
bsd_signal
bsearch
bstring
btowc
btree
builtin
builtins
byteorder
bzero
c
cabs
cacheflush
cacos
cacosh
cal
canonicalize_file_name
capabilities
capget
carg
casin
casinh
catan
catanh
catgets
catopen
cbrt
ccos
ccosh
ceil
cerf
cexp
cexp2
cfree
chage
charmap
charsets
chatise
chdir
chgrp
chmod
chown
chpasswd
chroot
chrt
chsh
cimag
clearenv
clock
clock_getcpuclockid
clock_getres
clock_nanosleep
clog
clog10
clog2
clone
close
closedir
cmp
cmsg
col
complex
confstr
conj
connect
console
console_codes
console_ioctl
consoletype
copysign
core
cos
cosh
cp
cp1251
cpow
cproj
cpuid
cpuset
creal
create_module
createrepo
credentials
cron
crond
crontab
crypt
crypttab
csin
csinh
csqrt
ctan
ctanh
ctermid
ctime
ctluser
ctrlaltdel
daemon
db2dvi
db2html
db2pdf
db2ps
db2rtf
dbopen
dd
ddp
delete_module
delpart
depmod
des_crypt
df
diff
diff3
difftime
dir
dir_colors
dircolors
dirfd
div
dl_iterate_phdr
dlopen
dmesg
docbook2dvi
docbook2html
docbook2man
docbook2man-spec
docbook2pdf
docbook2ps
docbook2rtf
docbook2tex
docbook2texi
docbook2texi-spec
docbook2txt
doexec
domainname
dprintf
drand48
drand48_r
dsp56k
du
dup
dysize
ecvt
ecvt_r
egrep
eject
elf
encrypt
end
endian
environ
envz_add
epoll
epoll_create
epoll_ctl
epoll_wait
erf
erfc
err
errno
error
ether_aton
ethers
euidaccess
eventfd
evim
exec
execve
exit
exit_group
exp
exp10
exp2
expm1
exportfs
exports
fabs
faccessat
faillog
fallocate
fchmodat
fchownat
fclose
fcloseall
fcntl
fd
fdformat
fdim
fdisk
feature_test_macros
fenv
ferror
fexecve
fflush
ffs
fgetgrent
fgetpwent
fgetwc
fgetws
fgrep
fifo
filesystems
finite
flock
flockfile
floor
fma
fmax
fmemopen
fmin
fmod
fmtmsg
fnmatch
fopen
fopencookie
fork
fpathconf
fpclassify
fpurge
fputwc
fputws
fread
free
frexp
frontend-spec
fseek
fseeko
fstab
fstab-decode
fstatat
fsync
ftime
ftok
ftpusers
fts
ftw
full
fuser
futex
futimes
futimesat
fwide
gamma
gcvt
get_kernel_syms
get_mempolicy
get_thread_area
getaddrinfo
getcontext
getcpu
getcwd
getdate
getdents
getdirentries
getdomainname
getdtablesize
getenv
getfsent
getgid
getgrent
getgrent_r
getgrnam
getgrouplist
getgroups
gethostbyname
gethostid
gethostname
getifaddrs
getipnodebyname
getitimer
getkey
getline
getloadavg
getlogin
getmntent
getnameinfo
getnetent
getnetent_r
getopt
getpagesize
getpass
getpeername
getpid
getpriority
getprotoent
getprotoent_r
getpt
getpw
getpwent
getpwent_r
getpwnam
getresuid
getrlimit
getrpcent
getrpcent_r
getrpcport
getrusage
gets
getservent
getservent_r
getsid
getsockname
getsockopt
getsubopt
gettid
gettimeofday
getttyent
getuid
getumask
getusershell
getutent
getutmp
getw
getwchar
getxattr
glob
gnu_get_libc_version
gpasswd
grantpt
grep
group
groupadd
groupdel
groupmod
grpck
grpconv
grpunconv
gshadow
gsignal
gssd
gunzip
guru
gzexe
gzip
halt
hash
hd
hier
host
hostname
hosts
hsearch
hypot
i386
icmp
iconv
iconv_close
iconv_open
idle
idmapd
ifconfig
ilogb
index
inet
inet_ntop
inet_pton
infnan
init
init_module
initgroups
initlog
initrd
initscript
inittab
inotify
inotify_add_watch
inotify_init
inotify_rm_watch
insmod
insque
install
install-catalog
intro
io_cancel
io_destroy
io_getevents
io_setup
io_submit
ioctl
ioctl_list
ioperm
iopl
ioprio_set
ip
ipc
ipcalc
ipcrm
ipcs
ipv6
isalpha
isatty
isgreater
iso_8859-1
iso_8859-10
iso_8859-11
iso_8859-13
iso_8859-14
iso_8859-15
iso_8859-16
iso_8859-2
iso_8859-3
iso_8859-4
iso_8859-5
iso_8859-6
iso_8859-7
iso_8859-8
iso_8859-9
issue
iswalnum
iswalpha
iswblank
iswcntrl
iswctype
iswdigit
iswgraph
iswlower
iswprint
iswpunct
iswspace
iswupper
iswxdigit
j0
jade
jw
key_setsecret
kill
killall
killall5
killpg
koi8-r
koi8-u
last
lastb
lastlog
ld
ldconfig
ldd
ldexp
lgamma
libc
link
linkat
linux32
linux64
listen
listxattr
llseek
ln
locale
localeconv
lockd
lockf
log
log10
log1p
log2
logb
login
longjmp
lookup_dcookie
lp
lrint
lround
ls
lsearch
lseek
lseek64
lsmod
lspci
lsusb
madvise
mailaddr
makecontext
makedev
makewhatis
malloc
malloc_hook
man
man-pages
math_error
matherr
mbind
mblen
mbrlen
mbrtowc
mbsinit
mbsnrtowcs
mbsrtowcs
mbstowcs
mbtowc
mcookie
mdoc
mem
memccpy
memchr
memcmp
memcpy
memfrob
memmem
memmove
mempcpy
memset
mesg
mincore
mkdir
mkdirat
mkdtemp
mkfifo
mkfifoat
mkfs
mknod
mknodat
mkstemp
mkswap
mktemp
mlock
mmap
mmap2
modf
modify_ldt
modifyrepo
modinfo
modprobe
more
motd
mount
mountd
mountpoint
mouse
move_pages
mpool
mprotect
mq_close
mq_getattr
mq_getsetattr
mq_notify
mq_open
mq_overview
mq_receive
mq_send
mq_unlink
mremap
msgctl
msgget
msgop
msr
msync
mtrace
mv
nan
nanosleep
netdevice
netlink
netreport
netstat
networks
newgrp
newusers
nextafter
nfs
nfsd
nfsservctl
nfsstat
nice
nicknames
nisdomainname
nl_langinfo
nmap
nologin
nscd
nsgmls
nsswitch
ntpd
ntpdc
null
numa
offsetof
on_exit
onsgmls
open
openat
opendir
openjade
openpty
operator
osgmlnorm
ospam
ospcat
ospent
osx
outb
package-cleanup
packet
passwd
path_resolution
pause
pciconfig_read
pcilib
perror
personality
pgrep
pidof
pipe
pivot_root
pkill
plipconfig
pmap
poll
popen
posix_fadvise
posix_fallocate
posix_memalign
posix_openpt
posixoptions
pow
pow10
poweroff
ppp-watch
pppoe
pppoe-connect
pppoe-relay
pppoe-server
pppoe-setup
pppoe-sniff
pppoe-start
pppoe-status
pppoe-stop
pppoe-wrapper
prctl
pread
printf
proc
profil
program_invocation_name
protocols
psignal
pstree
pthread_atfork
pthread_attr_destroy
pthread_attr_getdetachstate
pthread_attr_getinheritsched
pthread_attr_getschedparam
pthread_attr_getschedpolicy
pthread_attr_getscope
pthread_attr_init
pthread_attr_setaffinity_np
pthread_attr_setdetachstate
pthread_attr_setguardsize
pthread_attr_setinheritsched
pthread_attr_setschedparam
pthread_attr_setschedpolicy
pthread_attr_setscope
pthread_attr_setstack
pthread_attr_setstackaddr
pthread_attr_setstacksize
pthread_cancel
pthread_cleanup_pop
pthread_cleanup_pop_restore_np
pthread_cleanup_push
pthread_cleanup_push_defer_np
pthread_cond_broadcast
pthread_cond_destroy
pthread_cond_init
pthread_cond_signal
pthread_cond_timedwait
pthread_cond_wait
pthread_condattr_destroy
pthread_condattr_init
pthread_create
pthread_detach
pthread_equal
pthread_exit
pthread_getattr_np
pthread_getcpuclockid
pthread_getschedparam
pthread_getspecific
pthread_join
pthread_key_create
pthread_key_delete
pthread_kill
pthread_kill_other_threads_np
pthread_mutex_destroy
pthread_mutex_init
pthread_mutex_lock
pthread_mutex_trylock
pthread_mutex_unlock
pthread_mutexattr_destroy
pthread_mutexattr_getkind_np
pthread_mutexattr_gettype
pthread_mutexattr_init
pthread_mutexattr_setkind_np
pthread_mutexattr_settype
pthread_once
pthread_self
pthread_setaffinity_np
pthread_setcancelstate
pthread_setcanceltype
pthread_setconcurrency
pthread_setschedparam
pthread_setschedprio
pthread_setspecific
pthread_sigmask
pthread_testcancel
pthread_tryjoin_np
pthread_yield
pthreads
ptrace
pts
ptsname
pty
putenv
putgrent
putpwent
puts
putwchar
pwck
pwconv
pwdx
pwunconv
qecvt
qsort
query_module
queue
quotactl
raise
ram
rand
random
random_r
raw
rbash
rcmd
re_comp
read
readahead
readdir
readlink
readlinkat
readv
realpath
reboot
recno
recv
regex
remainder
remap_file_pages
remove
removexattr
remquo
rename
renameat
renice
repo-rss
repoquery
reposync
resolv
resolver
rev
rewinddir
rexec
rgrep
rint
rm
rmdir
rmmod
round
route
rpc
rpm
rpmatch
rquotad
rtc
rtime
rtld-audit
rtnetlink
runlevel
scalb
scalbln
scandir
scanf
sched_get_priority_max
sched_getcpu
sched_rr_get_interval
sched_setaffinity
sched_setparam
sched_setscheduler
sched_yield
sd
sdiff
securetty
sed
seekdir
select
select_tut
sem_close
sem_destroy
sem_getvalue
sem_init
sem_open
sem_overview
sem_post
sem_unlink
sem_wait
semctl
semget
semop
send
sendfile
service
services
set_mempolicy
set_thread_area
set_tid_address
setaliasent
setarch
setbuf
setenv
seteuid
setfsgid
setfsuid
setgid
setjmp
setlocale
setlogmask
setnetgrent
setpci
setpgid
setresuid
setreuid
setsid
setuid
setup
setxattr
sfdisk
sg
sgetmask
sgmldiff
sgmlnorm
shadow
shells
shm_open
shm_overview
shmctl
shmget
shmop
showmount
shutdown
sigaction
sigaltstack
siginterrupt
signal
signalfd
signbit
significand
sigpause
sigpending
sigprocmask
sigqueue
sigreturn
sigset
sigsetops
sigsuspend
sigvec
sigwait
sigwaitinfo
sin
sincos
sinh
sk98lin
skill
slabinfo
slabtop
slattach
sleep
snice
sockatmark
socket
socketcall
socketpair
spam
spent
splice
spu_create
spu_run
spufs
sqrt
st
standards
stat
statd
statfs
statvfs
stdarg
stdin
stdio
stdio_ext
stime
stpcpy
stpncpy
strcasecmp
strcat
strchr
strcmp
strcoll
strcpy
strdup
strerror
strfmon
strfry
strftime
string
strlen
strnlen
strpbrk
strptime
strsep
strsignal
strspn
strstr
strtod
strtoimax
strtok
strtol
strtoul
strverscmp
strxfrm
suffixes
sulogin
svcgssd
svipc
swab
swapoff
swapon
switchdesk
sx
symlink
symlinkat
sync
sync_file_range
sys-unconfig
syscall
syscalls
sysconf
sysctl
sysfs
sysinfo
syslog
system
sysv_signal
tailf
tan
tanh
tcgetpgrp
tcgetsid
tcp
tee
telinit
telldir
tempnam
termcap
termio
termios
tgamma
time
timegm
timer_create
timer_delete
timer_getoverrun
timer_settime
timeradd
timerfd_create
times
tkill
tkpppoe
tload
tmpfile
tmpnam
toascii
touch
toupper
towctrans
towlower
towupper
trunc
truncate
tsearch
tty
ttyS
tty_ioctl
ttyname
ttyslot
ttytype
tzfile
tzselect
tzset
ualarm
udp
udplite
ulimit
umask
umount
uname
undocumented
ungetwc
unicode
unimplemented
units
unix
unlink
unlinkat
unlocked_stdio
unlockpt
unshare
update-pciids
updwtmp
uptime
uri
uselib
useradd
userdel
usermod
usernetctl
usleep
ustat
utf-8
utime
utimensat
utmp
vcs
vdir
vfork
vhangup
vigr
vim
vimdiff
vimtutor
vipw
vm86
vmsplice
vmstat
volname
w
wait
wait4
wall
watch
wavelan
wcpcpy
wcpncpy
wcrtomb
wcscasecmp
wcscat
wcschr
wcscmp
wcscpy
wcscspn
wcsdup
wcslen
wcsncasecmp
wcsncat
wcsncmp
wcsncpy
wcsnlen
wcsnrtombs
wcspbrk
wcsrchr
wcsrtombs
wcsspn
wcsstr
wcstoimax
wcstok
wcstombs
wcswidth
wctob
wctomb
wctrans
wctype
wcwidth
whatis
whereis
wmemchr
wmemcmp
wmemcpy
wmemmove
wmemset
wordexp
wprintf
write
x25
x86_64
xcrypt
xdr
xxd
y0
ypcat
ypchfn
ypchsh
ypdomainname
ypmatch
yppasswd
yppoll
ypset
yptest
ypwhich
yum
yum-builddep
yum-complete-transaction
yum-shell
yum-updatesd
yum-utils
yum-verify
yumdownloader
zcat
zcmp
zdiff
zdump
zforce
zgrep
zic
zmore
znew

Pages de MAN

GETOPT(1)							     GETOPT(1)



NAME
       getopt - parse command options (enhanced)

SYNOPSIS
       getopt optstring parameters
       getopt [options] [--] optstring parameters
       getopt [options] -o|--options optstring [options] [--] parameters

DESCRIPTION
       getopt  is  used	 to break up (parse) options in command lines for easy
       parsing by shell procedures, and to check for legal options.   It  uses
       the GNU getopt(3) routines to do this.

       The  parameters	getopt	is  called with can be divided into two parts:
       options	which  modify  the  way	 getopt	 will	parse	(options   and
       -o|--options  optstring	in the SYNOPSIS), and the parameters which are
       to be parsed (parameters in the SYNOPSIS).  The second part will	 start
       at  the	first  non-option parameter that is not an option argument, or
       after the first occurrence of '--'.  If no '-o' or  '--options'	option
       is  found  in the first part, the first parameter of the second part is
       used as the short options string.

       If the environment variable GETOPT_COMPATIBLE is set, or if  its	 first
       parameter  is  not  an  option  (does not start with a '-', this is the
       first format in the SYNOPSIS), getopt will generate output that is com-
       patible	with  that  of	other versions of getopt(1).  It will still do
       parameter shuffling and recognize optional arguments (see section  COM-
       PATIBILITY for more information).

       Traditional  implementations  of	 getopt(1)  are	 unable	 to  cope with
       whitespace and other (shell-specific) special characters	 in  arguments
       and  non-option	parameters. To solve this problem, this implementation
       can generate quoted output which must once again be interpreted by  the
       shell  (usually by using the eval command). This has the effect of pre-
       serving those characters, but you must call getopt in a way that is  no
       longer  compatible  with	 other versions (the second or third format in
       the SYNOPSIS).  To determine whether this enhanced version of getopt(1)
       is installed, a special test option (-T) can be used.

OPTIONS
       -a, --alternative
	      Allow long options to start with a single '-'.

       -h, --help
	      Output  a small usage guide and exit successfully. No other out-
	      put is generated.

       -l, --longoptions longopts
	      The long (multi-character) options to be recognized.  More  than
	      one  option  name	 may  be  specified at once, by separating the
	      names with commas. This option may be given more than once,  the
	      longopts	are cumulative.	 Each long option name in longopts may
	      be followed by one colon to indicate it has a required argument,
	      and by two colons to indicate it has an optional argument.

       -n, --name progname
	      The  name	 that  will  be used by the getopt(3) routines when it
	      reports errors. Note that errors of getopt(1) are still reported
	      as coming from getopt.

       -o, --options shortopts
	      The  short  (one-character)  options  to	be recognized. If this
	      option is not found, the first parameter of getopt that does not
	      start  with a '-' (and is not an option argument) is used as the
	      short options string.  Each short option character in  shortopts
	      may be followed by one colon to indicate it has a required argu-
	      ment, and by two colons to indicate it has an optional argument.
	      The  first character of shortopts may be '+' or '-' to influence
	      the way options are parsed and output is generated (see  section
	      SCANNING MODES for details).

       -q, --quiet
	      Disable error reporting by getopt(3).

       -Q, --quiet-output
	      Do  not  generate	 normal	 output.  Errors are still reported by
	      getopt(3), unless you also use -q.

       -s, --shell shell
	      Set quoting conventions to those of shell. If no -s argument  is
	      found,  the  BASH conventions are used. Valid arguments are cur-
	      rently 'sh' 'bash', 'csh', and 'tcsh'.

       -u, --unquoted
	      Do not quote  the	 output.  Note	that  whitespace  and  special
	      (shell-dependent)	 characters can cause havoc in this mode (like
	      they do with other getopt(1) implementations).

       -T, --test
	      Test if your getopt(1) is this enhanced version or an  old  ver-
	      sion.  This generates no output, and sets the error status to 4.
	      Other implementations of getopt(1),  and	this  version  if  the
	      environment  variable GETOPT_COMPATIBLE is set, will return '--'
	      and error status 0.

       -V, --version
	      Output version information and exit successfully. No other  out-
	      put is generated.

PARSING
       This  section specifies the format of the second part of the parameters
       of getopt (the parameters in the SYNOPSIS).  The next section  (OUTPUT)
       describes the output that is generated. These parameters were typically
       the parameters a shell function was called with.	 Care  must  be	 taken
       that  each  parameter the shell function was called with corresponds to
       exactly one parameter in the parameter list of getopt  (see  the	 EXAM-
       PLES).  All parsing is done by the GNU getopt(3) routines.

       The parameters are parsed from left to right. Each parameter is classi-
       fied as a short option, a long option, an argument to an option,	 or  a
       non-option parameter.

       A simple short option is a '-' followed by a short option character. If
       the option has a required argument, it may be  written  directly	 after
       the option character or as the next parameter (ie. separated by whites-
       pace on the command line). If the option has an optional	 argument,  it
       must be written directly after the option character if present.

       It  is possible to specify several short options after one '-', as long
       as all (except possibly the last) do  not  have	required  or  optional
       arguments.

       A  long	option	normally  begins with '--' followed by the long option
       name.  If the option  has  a  required  argument,  it  may  be  written
       directly	 after	the long option name, separated by '=', or as the next
       argument (ie. separated by whitespace on the  command  line).   If  the
       option  has an optional argument, it must be written directly after the
       long option name, separated by '=', if present (if you add the '='  but
       nothing	behind	it,  it	 is interpreted as if no argument was present;
       this is a slight bug, see the BUGS).  Long options may be  abbreviated,
       as long as the abbreviation is not ambiguous.

       Each  parameter not starting with a '-', and not a required argument of
       a previous option, is a non-option parameter. Each  parameter  after  a
       '--' parameter is always interpreted as a non-option parameter.	If the
       environment variable POSIXLY_CORRECT is set, or	if  the	 short	option
       string  started with a '+', all remaining parameters are interpreted as
       non-option parameters as soon as	 the  first  non-option	 parameter  is
       found.

OUTPUT
       Output is generated for each element described in the previous section.
       Output is done in the same order as the elements are specified  in  the
       input, except for non-option parameters. Output can be done in compati-
       ble (unquoted) mode, or in such way that whitespace and	other  special
       characters  within  arguments  and  non-option parameters are preserved
       (see QUOTING).  When the output is processed in the  shell  script,  it
       will seem to be composed of distinct elements that can be processed one
       by one (by using the shift command in most shell	 languages).  This  is
       imperfect  in  unquoted	mode,  as  elements can be split at unexpected
       places if they contain whitespace or special characters.

       If there are problems parsing the parameters,  for  example  because  a
       required argument is not found or an option is not recognized, an error
       will be reported on stderr, there will be no output for	the  offending
       element, and a non-zero error status is returned.

       For a short option, a single '-' and the option character are generated
       as one parameter. If the option has an  argument,  the  next  parameter
       will  be	 the  argument.	 If the option takes an optional argument, but
       none was found, the next parameter will be generated but	 be  empty  in
       quoting	mode,  but  no	second parameter will be generated in unquoted
       (compatible) mode.  Note that many other getopt(1)  implementations  do
       not support optional arguments.

       If  several  short options were specified after a single '-', each will
       be present in the output as a separate parameter.

       For a long option, '--' and the full option name are generated  as  one
       parameter.  This	 is done regardless whether the option was abbreviated
       or specified with a single '-' in the input. Arguments are  handled  as
       with short options.

       Normally,  no  non-option  parameters  output  is  generated  until all
       options and their arguments have been generated. Then '--' is generated
       as  a  single  parameter, and after it the non-option parameters in the
       order they were found, each as a separate parameter.  Only if the first
       character  of  the short options string was a '-', non-option parameter
       output is generated at the place they are found in the input  (this  is
       not supported if the first format of the SYNOPSIS is used; in that case
       all preceding occurrences of '-' and '+' are ignored).

QUOTING
       In compatible mode, whitespace or 'special' characters in arguments  or
       non-option  parameters  are not handled correctly. As the output is fed
       to the shell script, the script does not know how  it  is  supposed  to
       break the output into separate parameters.  To circumvent this problem,
       this implementation offers quoting. The idea is that output  is	gener-
       ated  with quotes around each parameter. When this output is once again
       fed to the shell (usually by a shell eval command), it  is  split  cor-
       rectly into separate parameters.

       Quoting is not enabled if the environment variable GETOPT_COMPATIBLE is
       set, if the first form of the SYNOPSIS is used, or if the  option  '-u'
       is found.

       Different  shells  use  different  quoting conventions. You can use the
       '-s' option to select the shell you are using. The following shells are
       currently  supported:  'sh',  'bash', 'csh' and 'tcsh'.	Actually, only
       two  'flavors'  are  distinguished:  sh-like  quoting  conventions  and
       csh-like quoting conventions. Chances are that if you use another shell
       script language, one of these flavors can still be used.


SCANNING MODES
       The first character of the short options string may be a '-' or	a  '+'
       to  indicate  a special scanning mode. If the first calling form in the
       SYNOPSIS	 is  used  they	 are   ignored;	  the	environment   variable
       POSIXLY_CORRECT is still examined, though.

       If  the	first  character  is  '+',  or	if  the	 environment  variable
       POSIXLY_CORRECT is set, parsing stops as soon as the  first  non-option
       parameter  (ie.	a  parameter  that does not start with a '-') is found
       that is not an option argument. The remaining parameters are all inter-
       preted as non-option parameters.

       If the first character is a '-', non-option parameters are outputted at
       the place where they are found; in normal operation, they are all  col-
       lected  at the end of output after a '--' parameter has been generated.
       Note that this '--' parameter is still generated, but it will always be
       the last parameter in this mode.

COMPATIBILITY
       This version of getopt(1) is written to be as compatible as possible to
       other versions. Usually you can just replace  them  with	 this  version
       without any modifications, and with some advantages.

       If  the	first character of the first parameter of getopt is not a '-',
       getopt goes into compatibility mode. It will interpret its first param-
       eter  as	 the  string of short options, and all other arguments will be
       parsed. It will still do parameter shuffling (ie. all non-option param-
       eters  are  outputted  at  the  end),  unless  the environment variable
       POSIXLY_CORRECT is set.

       The environment variable GETOPT_COMPATIBLE forces getopt into  compati-
       bility mode. Setting both this environment variable and POSIXLY_CORRECT
       offers 100% compatibility for 'difficult'  programs.  Usually,  though,
       neither is needed.

       In  compatibility  mode,	 leading  '-'  and '+' characters in the short
       options string are ignored.

RETURN CODES
       getopt returns error code 0 for	successful  parsing,  1	 if  getopt(3)
       returns errors, 2 if it does not understand its own parameters, 3 if an
       internal error occurs like out-of-memory, and 4 if it  is  called  with
       -T.

EXAMPLES
       Example	scripts	 for (ba)sh and (t)csh are provided with the getopt(1)
       distribution, and are optionally installed in /usr/share/getopt.


ENVIRONMENT
       POSIXLY_CORRECT
	      This environment variable is examined by the getopt(3) routines.
	      If it is set, parsing stops as soon as a parameter is found that
	      is not an option or an option argument. All remaining parameters
	      are   also  interpreted  as  non-option  parameters,  regardless
	      whether they start with a '-'.

       GETOPT_COMPATIBLE
	      Forces getopt to use the first calling format  as	 specified  in
	      the SYNOPSIS.

BUGS
       getopt(3) can parse long options with optional arguments that are given
       an empty optional argument (but can not do  this	 for  short  options).
       This getopt(1) treats optional arguments that are empty as if they were
       not present.

       The syntax if you do not want any short option variables at all is  not
       very intuitive (you have to set them explicitly to the empty string).


AUTHOR
       Frodo Looijaard 

SEE ALSO
       getopt(3), bash(1), tcsh(1).

AVAILABILITY
       The  getopt  command is part of the util-linux-ng package and is avail-
       able from ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.



Linux				 May 31, 1997			     GETOPT(1)

 


www.eurower.info