Re: [PATCH] fixup! use perl instead of sed
- From
- Jonathan Tan <jonathantanmy@google.com>
- Date
- May 9, 2017, 21:04 UTC
- Message-ID
- <9353580b-d792-f3c5-a099-74eb49b867b0@google.com>
- In-Reply-To
- <4cb1d101-3efa-6376-64fd-2b9090d0b0c4@kdbg.org>
On 05/09/2017 01:43 PM, Johannes Sixt wrote:
Show 15 quoted lines
> Am 09.05.2017 um 19:00 schrieb Ævar Arnfjörð Bjarmason: >> Finally, you can just use -i like you did with sed, no need for the >> tempfile: > > Nope. Some implementations of perl attempt to remove the file that it > has just opened. That doesn't work on Windows. You have to supply a > backup file name as in `perl -i.bak ...` :-( > >> >> $ echo hibar >push >> $ perl -pi -e 's/([^ ])bar/$1baz/' push >> $ cat push >> hibaz > > -- Hannes
Thanks - sent a fixup [1] in reply to my PATCH v3 cover letter (but forgot to CC you).
[1] <20170509210158.17898-1-jonathantanmy@google.com>