Update cheatsheets

This commit is contained in:
ivuorinen
2025-07-26 00:21:07 +00:00
parent 46995545d6
commit 5dd0e05729
145 changed files with 351 additions and 275 deletions

View File

@@ -9,15 +9,15 @@ source: https://github.com/tldr-pages/tldr.git
> See also: `awk`, `ed`.
> More information: <https://www.gnu.org/software/sed/manual/sed.html>.
- Replace `apple` with `mango` on all lines using basic regex, print to `stdout`:
- Replace `apple` with `mango` on all lines using basic `regex`, print to `stdout`:
`{{command}} | sed 's/apple/mango/g'`
- Replace `apple` with `APPLE` on all lines using extended regex, print to `stdout`:
- Replace `apple` with `APPLE` on all lines using extended `regex`, print to `stdout`:
`{{command}} | sed {{[-E|--regexp-extended]}} 's/(apple)/\U\1/g'`
- Use basic regex to replace `apple` with `mango` and `orange` with `lime` in-place in a file (overwriting original file):
- Use basic `regex` to replace `apple` with `mango` and `orange` with `lime` in-place in a file (overwriting original file):
`sed {{[-i|--in-place]}} -e 's/apple/mango/g' -e 's/orange/lime/g' {{path/to/file}}`