Home » RDBMS Server » Server Utilities » Need clarification.
Need clarification. [message #197500] Wed, 11 October 2006 08:46 Go to next message
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.
Re: Need clarification. [message #197512 is a reply to message #197500] Wed, 11 October 2006 09:19 Go to previous message
Mahesh Rajendran
Messages: 10672
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Do manpage on 'getopt'.

man getopt.
Previous Topic: Impdp parallel worker status
Next Topic: Converting Sybase database to Oracle database ...
Goto Forum:
  


Current Time: Sat Dec 10 12:34:29 CST 2016

Total time taken to generate the page: 0.09327 seconds