Code: Select all
xfce4-terminal -x bash -ic "command1"
command2
Code: Select all
while [[ -n $(pgrep command1) ]] ; do sleep 1 ; done
Code: Select all
xfce4-terminal -x bash -ic "command1" UniqueID
while [[ -n $(ps a | awk '/UniqueID/&&!/awk/') ]] ; do sleep 1 ; done
command2
How is a neater way to accomplish this?