Forrest logo
back to context overview

tr

List of commands for tr:

  • tr:tldr:0e1c7 tr: Compress a series of identical characters to a single character.
    $ tr -s '${input_characters}' < ${filename}
    try on your machine
    explain this command
  • tr:tldr:1645b tr: Strip out non-printable characters from a file.
    $ tr -cd "[:print:]" < ${filename}
    try on your machine
    explain this command
  • tr:tldr:3b86a tr: Replace all occurrences of a character from another command's output.
    $ echo ${text} | tr ${find_character} ${replace_character}
    try on your machine
    explain this command
  • tr:tldr:4eb0b tr: Delete all occurrences of the specified set of characters from the input.
    $ tr -d '${input_characters}' < ${filename}
    try on your machine
    explain this command
  • tr:tldr:67ef4 tr: Translate the contents of a file to upper-case.
    $ tr "[:lower:]" "[:upper:]" < ${filename}
    try on your machine
    explain this command
  • tr:tldr:79b5d tr: Replace all occurrences of a character in a file, and print the result.
    $ tr ${find_character} ${replace_character} < ${filename}
    try on your machine
    explain this command
back to context overview