Verifying bash script arguments
Thursday, 6 April 2023
Add Comment
Many bash scripts use arguments to control the commands that they will run and the information that will be provided to the people running them. This post examines a number of ways that you can verify arguments when you prepare a script and want to make sure that it will do just what you intend it to do – even when someone running it makes a mistake.
Displaying the script name, etc.
To display the name of a script when it’s run, use a command like echo $0. While anyone running a script will undoubtedly know what script they just invoked, using the script name in a usage command can help remind them what command and arguments they should be providing.
from Network World https://ift.tt/SX6tHMQ
Genrerating Link.... 15 seconds.
Your Link is Ready.
0 Response to "Verifying bash script arguments"
Post a Comment