Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing a --option

Status
Not open for further replies.

iaresean

Programmer
Mar 24, 2003
570
ZA
Hello All;

Is there some special variable in the shell that stores all '--' options. I have an old script which I pass three variables to, and I am trying to add the passing of the option which will affect the logical flow of script. I don't want to have to get each variable and then perform a check to see if it is the '--option'. I would like to use the built-in options variable (if one exists) and simply check that the correct option has been passed.

Any and all help is greatly appreciated.

Sean. [peace]
 
man getopt or man getopts

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top