0

On linux the following operation with getopt works fine:

TEMP=`getopt :mvfuhr:: --long "mask,verbose,force,unmask, help, remask::" -n  'test.sh' -- "$@"`

On Solaris, i am unable use the long arguments to process... Though the this works:

  TEMP=`getopt :mvfuhr:: "$@"`

Looks like the getopt bundled with the solaris is of an older version. How can i make it work like linux? or is there some setting that needs to be done to process long arguments?

Nida Sahar
  • 698
  • 4
  • 13
  • 29

1 Answers1

0

Here is a clever (although currently with a minor bug) way to handle this issue:

Using getopts in bash shell script to get long and short command line options

Community
  • 1
  • 1
jlliagre
  • 29,783
  • 6
  • 61
  • 72