1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-09-09 21:33:50 +02:00

perl: tweak the -0 example

This commit is contained in:
Waldir Pimenta 2017-05-13 17:01:12 +01:00 committed by Agniva De Sarker
parent dc9547925f
commit efbf0cc51e

View file

@ -22,10 +22,10 @@
`perl -p -i -e 's/{{find}}/{{replace}}/g' {{filename}}`
- Run a multi-line find/replace expression on a file (i.e. including line breaks):
`perl -0 -p -i -e 's/{{foo\nbar}}/{{foobar}}/g' {{filename}}`
- Run a find/replace expression on a file, saving the original file with a given extension:
`perl -p -i'.old' -e 's/{{find}}/{{replace}}/g' {{filename}}`
- Run a multi-line find/replace expression on a file, and save the result in another file:
`perl -p0e 's/{{foo\nbar}}/{{foobar}}/g' {{input_file}} > {{output_file}}`