I have a bash script that looks like this (called job_result.sh):
#!/bin/bash
$* && zenity --title "Job result" --info --text "SUCSESS: Job '$*'completed" && while pidof zenity > /dev/null; do /usr/bin/wmctrl -a "Job Result" && sleep 2; done
When i execute it with:
$ ./job_result.sh echo "arf" && sleep 10
I want the following to happen:
$ echo "arf" && sleep 10 && zenity --title "Job result" --info --text "SUCSESS: Job '$*'completed" && while pidof zenity > /dev/null; do /usr/bin/wmctrl -a "Job Result" && sleep 2; done
But it seems the following is happening:
$ echo "arf" && zenity --title "Job result" --info --text "SUCSESS: Job '$*'completed" && while pidof zenity > /dev/null; do /usr/bin/wmctrl -a "Job Result" && sleep 2; done
Question: How do i get hold of the entire shell argument? And not just the part until &&?