For example, I wrote a script that is called testscript, then the script has several options, if be increase -a directory, 3-d delete the directory, w. home directory (that is to say, you want to delete all is behind the -w option specified directory inside operation), or all the options is the premise of must have support of -w option
Such as I have this execution: testscript -a newdir - w/home is in the/home directory to create a new newdir directory, if there is no -w option would be an error, so I want to ask next such functionality with getopt command how to implement
Guide for bosses
CodePudding user response:
Ginseng problem, getopt function used, under study