tr
Translate characters: run replacements based on single characters and character sets. tldr-pages
On several platforms
Several platforms
Replace all occurrences of a character in a file, and print the result
tr <path/to/file find_character replace_characterIdentifyReplace all occurrences of a character from another command's output
echo text | tr find_character replace_characterIdentifyMap each character of the first set to the corresponding character of the second set
tr <path/to/file 'abcd' 'jkmn'IdentifyDelete all occurrences of the specified set of characters from the input
tr <path/to/file --delete 'input_characters'IdentifyCompress a series of identical characters to a single character
tr <path/to/file --squeeze-repeats 'input_characters'IdentifyTranslate the contents of a file to upper-case
tr <path/to/file "[:lower:]" "[:upper:]"IdentifyStrip out non-printable characters from a file
tr <path/to/file --complement --delete "[:print:]"Identify