1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-09-10 13:33:43 +02:00

Create tr.md

tr is a small utility for translating characters in text documents
This commit is contained in:
Daniel Senff 2015-03-12 09:41:54 +01:00
parent 2bfc2e3a08
commit c86216e261

15
pages/common/tr.md Normal file
View file

@ -0,0 +1,15 @@
# tr
> translate characters - run replacements based on single characters
- replace all occurrences of a character in a file, and print the result
`tr {{find_character}} {{replace_character}} < {{filename}}`
Translate the contents of the file to upper-case, prints result.
`tr "[:lower:]" "[:upper:]" < {{filename}}`
Strip out non-printable characters from the file, prints result.
`tr -cd "[:print:]" < {{filename}}`