tr
noun
say it: “TEE AR” /ˌtiˈɑr/
A command that changes characters one for one, such as capitals into lowercase, or deletes them.
What does tr do?
tr (for translate) changes characters one for one: every character in the first list becomes the matching one in the second, so tr 'A-Z' 'a-z' turns capitals into lowercase. tr -d deletes characters instead. It reads only from a pipe or <, never from a file name.
echo "Rosa.Silva@example.com" | tr 'A-Z' 'a-z'
# rosa.silva@example.com
In a sentence
- “tr 'A-Z' 'a-z' turned Rosa.Silva@example.com into rosa.silva@example.com.”
- “The quotes vanished when Sam sent the line through tr -d.”
Level: Apprentice · More Unix terms at this level
Updated