Need clarification. [message #197500] |
Wed, 11 October 2006 08:46 |
marlon_loyolite
Messages: 66 Registered: July 2006
|
Member |
|
|
Hi Friends,
Can anyone explain about what this getopt statement does or else
even this full coding of SHELL Scripts.
#!/bin/sh
progname=`basename ${0}`
USAGE="${progname}: Usage: ${progname} -s SID -p Procedures -f File_name -t Ftp -i DropIndex -d Disable_Triggers -c Connectstring"
ORATAB="/etc/oratab"
problem="n"
echo "${progname}: started `date`"
if [ $# -eq 0 ] || [ $# -gt 14 ]; then
problem="y"
fi
set -- `getopt s:p:f:t:i:d:c: $*`
if [ $? -ne 0 ]; then
problem="y"
fi
if [ "$problem" = "y" ]; then
echo "$USAGE"
exit 1
fi
It could be of great help.
Regards,
Marlon.
|
|
|
|