Apr 21

Chaining commands

Category: Linux   — Published by tengo on April 21, 2008 at 2:25 am

On linux, and most other unixes, you can chain commands by simply putting a "&&" in between. This shorthand version is often used on make/install procedures without explicitely explaining it. So when you next compile something on linux, use

sudo ./configure && sudo make && sudo make install

to execute everything in batch without further typing.

(Remember that the above command chain only applies when you do not need to pass additional parameters to configure!)