erinxocon / pyp

Automatically exported from code.google.com/p/pyp
0 stars 0 forks source link

Make option "--inplace" for sed -i like file editing #23

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I like pyp but the easiest way to edit file in place with pyp I found was:
cat f | pyp "p.replace('e', 'R')" | sponge f

But it's complicated and sponge isn't standard program (moreutils is not even 
in standard openSUSE's repositories).

So I propose to add option -i --inplace AND/OR add -o --output option that 
handles in place editing correctly. 

Original issue reported on code.google.com by InfR...@gmail.com on 27 May 2014 at 3:06

GoogleCodeExporter commented 8 years ago
thanks for the comment...can you provide a simple example?

t

Original comment by tobyro...@gmail.com on 9 Feb 2015 at 10:30