Posts

Showing posts from November, 2008

Howto do command sequence in linux with conditional check

Image
One of the cool things you can do in your CLI (Command Line Interface) or so called Terminal console is triggering one line of multi command sequence with conditional check. I'm always using this trick when I don't wanna wait for the first command which takes some minutes to finish to trigger the next command. Some people wrote a bash script file to do it but today i wanna show you how to do it in one single line of command. One of my common use of this trick is to trigger a loud song or alert after my dd command (which takes about 15 minutes) to copy a 2GB image to my SD cards. So, while waiting for these command to finish, I can do something else... Like playing Gangster Battle on Facebook 😜 or chatting on the IRC (wave me @ irc.freenode.net on #ubuntu-my) Here's the howto: Executing two or more commands in sequence To execute two or more commands in sequence regardless of the failure/success of the previous command, you can use the semi colon ";" in be