Tr

'Tr' Command #1

In this challenge, we practice using the tr command because it is a useful translation tool in Linux.

In a given fragment of text, replace all parentheses ( ) with box brackets [ ].

tr '(' '[' | tr ')' ']'
# ---------or---------- 
tr '()' '[]'

'Tr' Command #2

In this challenge, we practice using the tr command because it is a useful translation tool in Linux.

In a given fragment of text, delete all the lowercase characters a-z.

tr -d a-z

'Tr' Command #3

In a given fragment of text, replace all sequences of multiple spaces with just one space.

tr -s ' '

Last updated