Let's say I want to have the System Bell ring when a process is over say a download.
First I created a file named 'beep' that plays the System Bell. Because the System Bell rings by hitting cntrl-G the 'beep' file looks like this.
I then give the file owner execute permission. I know that this command would serve my purpose.
wget http://www.domain.com/somefile && /root/beep
However I want to sharpen my Bash programming skills.
I wanted to write the Bash script along the following logic and with the fewest lines possible. Not really a script, I want to insert this short script via command line instead of a file. Let's say the download has commenced and the PID = 16666.
until ps -p 16666
Now obviously 'ps -p 16666' will already evaluate to true. My question is, is there a way to maybe enclose 'ps -p 16666' and prepend some operator that inverts the condition to where until 'ps -p 16666' evaluates to false then run /root/beep?