What is the difference between ; and &&

Ceri Davies ceri at submonkey.net
Wed Jan 7 15:39:02 PST 2004


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

In the second form, each command will only run if the previous one
succeeded, which is usually what you meant.

[Of course, if the Makefile has it's dependencies correct, then a simple
 "make install" will achieve the same thing.]

Ceri

-- 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20040107/2b4dafae/attachment.bin


More information about the freebsd-questions mailing list