Home > database >  For help, shell script
For help, shell script

Time:11-19

Everyone a great god, and how to implement the shell script perform different command input multiple parameters, such as only one input parameter when executing a command, only a handful of other command does not perform, two input parameters when two commands, several other don't perform, and so on

CodePudding user response:

Train of thought, to get the number of incoming parameters, with $# encapsulate each command to function, and then ifelse to determine,
Weakness is only to a few parameters, too many parameters of the code was too complicated
  • Related