Re: [PATCH 2/2] Fix sed usage in tests to work around broken xpg4/sed on Solaris
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 20, 2015, 16:07 UTC
- Message-ID
- <xmqqd1zmzuc7.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <55AB6290.2090003@kdbg.org>
Johannes Sixt <j6t@kdbg.org> writes:
Show 5 quoted lines
>> I really wonder why the previous ">file+ && mv -f file+ file" dance >> needs to be replaced? > > The sed must be replaced because some versions on Solaris choke on the > incomplete last line in the file.
Switching from sed to perl is not being questioned.
I think Dscho is asking about the use of "-i", when the original idiom ">target+ && mv -f target+ target" worked perfectly fine.
I.e.
perl -p -e '...' file >file+ &&
mv file+ file