Add tr command.

pull/263/head
Uggla 2015-08-12 10:29:31 +02:00
parent 5fef2d2bf6
commit 4e1bd07c34
1 changed files with 2 additions and 0 deletions

View File

@ -190,6 +190,8 @@ Notes:
- Know about `tee` to copy from stdin to a file and also to stdout, as in `ls -al | tee file.txt`.
- Know about `tr` to transpose characters. Useful to remove carriage return ('\n') or modify CSV files.
- Know that locale affects a lot of command line tools in subtle ways, including sorting order (collation) and performance. Most Linux installations will set `LANG` or other locale variables to a local setting like US English. But be aware sorting will change if you change locale. And know i18n routines can make sort or other commands run *many times* slower. In some situations (such as the set operations or uniqueness operations below) you can safely ignore slow i18n routines entirely and use traditional byte-based sort order, using `export LC_ALL=C`.
- Know basic `awk` and `sed` for simple data munging. For example, summing all numbers in the third column of a text file: `awk '{ x += $3 } END { print x }'`. This is probably 3X faster and 3X shorter than equivalent Python.