help-make
[Top][All Lists]
Advanced

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

Re: What is the difference between > and >> in a makefile.


From: Stephan Beal
Subject: Re: What is the difference between > and >> in a makefile.
Date: Mon, 28 Mar 2011 22:38:22 +0200

On Mon, Mar 28, 2011 at 10:31 PM, givemecode <address@hidden> wrote:

> Stephan - I have more more question: why does append (>>) need to open in
> truncate mode first? Isn't truncate mode deleting the contents of the file?
> append shouldn't delete but well, append. thanks!!
>

The >> doesn't cause two opens, but using:

echo abc > x
echo def >> x

causes two opens. By wrapping it in a scope, and redirecting the scope, we
can avoid the >> operator and do a single open.

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/


reply via email to

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