To create a new bash script a empty blank file must be created and properly labeled as “name.sh”. The name portion off the file specification should be replaced by a meaningful name.
Make the file specification executable by issuing the following command.
chmod +x name.sh
To pass parameters to the script they are included on the command line.
./name.sh param1 param2 param3
Should any of the parameters include special characters they should be surrounded by double quotes ‘param1 “param 2” param3’.
Mr. Arch Brooks, Software Engineer, Brooks Computing Systems, LLC authored this article.