"What if you wanted to run a command and when it
finished, run another? Linux provides three ways to do this with a
slightly different end result. The semicolon (;), ampersand (&)
and the verticle pipe (|) all help the user "chain" commands
"In this example we are using the semicolon (;) to separate
these two commands. Using a semicolon tells the shell, "once the
first command finishes, run the second one". Once apt-get update
finishes, the system will then run it again using the upgrade
"[user@localhost ~/project1]$ ./configure && make
&& make install
"This command is mainly used by developers, software package
maintainers and Linux power users. This chain of commands compiles
a program and installs it. What the double-ampersands are telling
the system is "wait for the first command to successfully complete.
If it does complete successfully, run the next command".
Some of the products that appear on this site are from companies from which QuinStreet receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. QuinStreet does not include all companies or all types of products available in the marketplace.