Translate or delete characters Used to transliterate characters Accepts 2 args; set of characters to convert from and convert to
- An enumerated list, ABCDE…
- A character range, A-Z
- POSIX character classes, [:upper:]
Examples #
Delete tr -d '\r' < dos_file > unix_file
Squeeze
[me@linuxbox ~]$ echo "aaabbbccc" | tr -s ab
abccc