December 1999
Beginner
528 pages
11h 10m
English
Here’s a small collection of one-liners ([] means a space and [ ] means a tab).
| 's/\.$//g' | Delete all lines ending with a period |
| '-e /abcd/d' | Delete lines containing abcd |
| 's /[][][]*/[]/g' | Delete two or more spaces and replace with a single space |
| 's/^[][]*//g' | Delete one or more spaces at the beginning of a line |
| 's/\.[][]*/[]/g' | Delete a full stop followed by two or more spaces and replace with a space |
| '/^$/d' | Delete all blank lines |
| 's/^.//g' | Delete the first character |
| 's/COL\( . . .\)//g' | Delete three characters following the letters COL |
| 's/^\///g' | Delete the leading slash from a pathname |
| 's/[]/[ ]/g' | Delete all spaces and replace with a tab |
| 's/^[ ]//g' | Delete all tabs from the beginning of the line |
| 's/[ ]*//g' | Delete ... |
Read now
Unlock full access