|
@@ -2,11 +2,11 @@
|
|
|
|
|
|
> translate characters - run replacements based on single characters and character sets
|
|
|
|
|
|
-- Replace all occurrences of a character in a file, and prints the result
|
|
|
+- Replace all occurrences of a character in a file, and print the result
|
|
|
|
|
|
`tr {{find_characters}} {{replace_characters}} < {{filename}}`
|
|
|
|
|
|
-- Maps each character of the first set to the corresponding character of the second set.
|
|
|
+- Map each character of the first set to the corresponding character of the second set.
|
|
|
|
|
|
`tr 'abcd' 'jkmn' < {{filename}}`
|
|
|
|
|
@@ -14,14 +14,14 @@
|
|
|
|
|
|
`tr -d '{{input_characters}}'`
|
|
|
|
|
|
-- Compresses a series of identical characters to a single character.
|
|
|
+- Compress a series of identical characters to a single character.
|
|
|
|
|
|
`tr -s '\n'`
|
|
|
|
|
|
-- Translate the contents of the file to upper-case, prints result.
|
|
|
+- Translate the contents of the file to upper-case and print result.
|
|
|
|
|
|
`tr "[:lower:]" "[:upper:]" < {{filename}}`
|
|
|
|
|
|
-- Strip out non-printable characters from the file, prints result.
|
|
|
+- Strip out non-printable characters from the file and print result.
|
|
|
|
|
|
`tr -cd "[:print:]" < {{filename}}`
|