Re: [PATCH] Warnings before rebasing -i published history

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] Warnings before rebasing -i published history

From: Matthieu Moy <hidden>
Date: 2016-06-15 22:54:00

konglu@minatec.inpg.fr writes:
The fact is that the input of sed is "$1" itself. An redirecting the output
of sed to the same input doesn't seem to work.
No, reading and writing to the same file usually doesn't work (unless
you have a very good reason to do it). But using printf seems weird. It
just forces the shell to hold the whole output of sed in memory to be
able to pass it to printf.

Isn't a more conventional way to do that

sed -e '...' "$1" >"$1".new
mv "$1".new "$1"

?

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

Re: [PATCH] Warnings before rebasing -i published history

From: Tomas Carnecky <hidden>
Date: 2016-06-15 22:54:00

On Fri, 08 Jun 2012 10:52:04 +0200, Matthieu Moy [off-list ref] wrote:
Isn't a more conventional way to do that

sed -e '...' "$1" >"$1".new
mv "$1".new "$1"

?
Is sed -i not portable or what is the reason not to use it?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help