How to pass parameters to myscript.sh which I need to invoke using '/bin/bash' as below
/bin/bash -c myscript.sh
./myscript.sh arg1 arg2 arg3
or
/bin/bash myscript.sh arg1 arg2 arg3
(You don't need the -c
option)
and inside the script you can retrieve them by:
var1=$1
var2=$2