Salsaman rocks!

Someone asked on the gllug mailing list today how to attach a command on to the end of a running command
e.g. you want to do
emerge –sync && emerge –update world
and you start the sync and don’t want to wait, hit ctrl+z to stop it and then
fg && emerge –update world

I’ve had a look into this before but didn’t find any nice solution. Full respect to salsaman (creator of LiVES, a video editing system) for such an elegant answer.

The actual example included the || switch as well so you can run something else if it fails.

Technorati Tags: , , , ,