We run multiple shell scripts, but I would like to know how you can run the shell script, passing in a variable from the command line and then using the variable within the script.
Example:
$ myshellscript.sh (is currently how we call script).
I would like to pass script and dbName:
$ myshellscript.sh databaseName
With this passed, how do I reference the variable within the script?
Thanks in advance.
Example:
$ myshellscript.sh (is currently how we call script).
I would like to pass script and dbName:
$ myshellscript.sh databaseName
With this passed, how do I reference the variable within the script?
Thanks in advance.