tr

Translate or delete characters from input.

What it does

tr reads from stdin and replaces, deletes, or squeezes characters.

Quick Start

echo "abc" | tr a-z A-Z
echo "hello  world" | tr -s ' '

Examples

# Remove digits
echo "a1b2c3" | tr -d 0-9

# Replace spaces with newline
echo "one two three" | tr ' ' '\n'