What is the difference between ; and &&

Joe Marcus Clarke marcus at marcuscom.com
Wed Jan 7 15:39:06 PST 2004


On Wed, 2004-01-07 at 18:36, Eric F Crist wrote:
> Just wondering what the difference is between ; and &&?
> 
> I use make depend; make; make install and others say they use:

This notation will run each command, one after the other, regardless of
the exit status of the previous command.

> 
> make depend && make && make install

This notation will only run the subsequent command if the previous
command exited cleanly without error.  This is a much safer syntax.

Joe

-- 
PGP Key : http://www.marcuscom.com/pgp.asc


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: This is a digitally signed message part
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20040107/49eadd1a/attachment.bin


More information about the freebsd-questions mailing list