Bash manuscript parameters

I require to write a bash manuscript , and also would certainly like it to parse unordered parameters of the layout:

scriptname --param1 <string> --param2 <string> --param3 <date>

Is there a straightforward means to complete this, or am I virtually stuck to $1, $2, $3?

edit

(note - I do not require lengthy parameter names - solitary letters would certainly be great also)

0
2019-05-13 03:27:35
Source Share
Answers: 1

You need to make use of getopt.

0
2019-05-17 16:01:20
Source