The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 10-18-2007
hanhanbib hanhanbib is offline
Registered User
  
 

Join Date: Oct 2007
Posts: 1
Scripts that take String options

I need help to know how to create a script that takes string options and not only 1 charecter.

I wanted to make a script that takes 'string' options eg. hscript.sh -product XXX -version XXX
I know that I can make a script that takes "1 Charecter " options eg. hscript.sh -m XXX -l XXX -s XXX , with a function called "getopts".

When i tried to use "getopts" to make the options as a string and not only 1charecter the script didn't work.