I am running a script which checks something inside the command line. If it exists, then the whole command line is ran (with all other options specified in the command). Otherwise, something else should be done.
The command is ./run -I -X -l nodes=1:ppn=4. So, I wrote:
#!/bin/bash
for i in "$@"
do
case $i in
-I)
echo "Interactive job started"
SHOULD RUN THE WHOLE COMMAND SPECIFIED IN THE COMMAND LINE
exit
;;
esac
done
#do something else
How can I get the whole command line inside a bash script?