1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-08-16 01:55:48 +02:00

sed: fix misleading examples description. (#2685)

This commit is contained in:
Marco Bonelli 2019-01-08 19:28:59 +01:00 committed by Starbeamrainbowlabs
parent d3d85a87f3
commit cbe477bf50

View file

@ -2,11 +2,11 @@
> Edit text in a scriptable manner.
- Replace the first occurrence of a string in a file, and print the result:
- Replace the first occurrence of a regular expression in each line of a file, and print the result:
`sed 's/{{find}}/{{replace}}/' {{filename}}`
`sed 's/{{regex}}/{{replace}}/' {{filename}}`
- Replace all occurrences of an extended regular expression in a file:
- Replace all occurrences of an extended regular expression in a file, and print the result:
`sed -r 's/{{regex}}/{{replace}}/g' {{filename}}`