tr

The command that replaces, squeezes or deletes single characters as text passes through it.

In more detail

tr a-z A-Z maps one set onto another, tr -s ' ' squeezes runs of spaces into one, and tr -d deletes characters, as in tr -d ' ' to strip spaces from a count. It works on characters only and reads standard input, never a file name.

Example

tr '[:lower:]' '[:upper:]' <<< "quiet shell"

Related terms

Taught in

References

Certification courses