Good and Great use of 'tr' command

Post date: Dec 22, 2009 9:35:15 PM

Apart from the regular tr command usage, it can be used for performing the following tasks too,

for converting a windows file to UNIX file use the following command,

tr -d '\015'

if you need to concatenate the digits from a string, here is a way:

$ echo "Abc123d56E" | tr -cd '[[:digit:]]'

Output:

12356