make-w32
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fwd: Re: bug in the documentation, or ...?


From: nusret
Subject: Fwd: Re: bug in the documentation, or ...?
Date: Tue, 14 Feb 2006 14:09:57 -0800 (PST)

Note: forwarded message attached.


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
--- Begin Message --- Subject: Re: bug in the documentation, or ...? Date: Tue, 14 Feb 2006 16:43:58 -0500
%% nusret <address@hidden> writes:

  n> I really don't have any experience with Unix(-like)
  n> systems. Someone told in some mailing list that if we change ';' to
  n> '&&' the change will cause problems in some unix systems. is this
  n> true?

No, that's not true.

  n> Why do you say && is safer?

If you use this:

    cd foo; blahblah

and the directory "foo" does not exist then it will print an error BUT
it will still run the command "blahblah".  Consider what happens if
"blahblah" is really a rm command, for example:

    cd foo; rm *

Now if foo doesn't exist you'll remove all the files in your current
directory!!


On the other hand, if you use && then the second command only runs if
the first one succeeds, so with:

    cd foo && blahblah

the command "blahblah" won't run if the cd fails.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist

--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]