I have tried passing the shell variables to a shell script via command line arguments.
Below is the command written inside the shell script.
LOG_DIRECTORY="${prodName}_${users}users"
mkdir -m 777 "${LOG_DIRECTORY}"
and m trying to run this as:
prodName='DD' users=50 ./StatCollection_DBServer.sh
The command is working fine and creating the directory as per my requirement. But the issue is I don't want to execute the shell script as mentioned below.
Instead, I want to run it like
DD 50 ./StatCollection_DBServer.sh
And the script variables should get the value from here only and the Directory that will be created will be as "DD_50users".
Any help on how to do this?
Thanks in advance.