Linux Command: simple use of tr, linux Command tr use
The tr command is used for the work. If you forget Baidu in the future, you can summarize it by yourself. For example or something, copy the linux shell script.
Tr: common options
-C: replace this character set with the supplement set of Character Set 1. the character set must be ASCII.
-D: delete all input characters in string 1.
-S deletes all recurring character sequences and retains only the first string. The duplicate strings are compressed into one string.
-C or -- complerment: replace all characters that do not belong to the first character set;-d or -- delete: delete all characters that belong to the first character set;-s or -- squeeze-repeats: represents consecutive recurring characters with a single character;-t or -- truncate-set1: removes the first character set from the second character set.
From: http://man.linuxde.net/tr