changing upper/lower case with tr

August 4th, 2006 mysurface Posted in Text Manipulation, tr | Hits: 44538 | 3 Comments »

tr is actually a common translator, here I show you how to convert

string from uppercase to lowercase

echo "UPPER" | tr [A-Z] [a-z]

from lower to upper

echo "lower" | tr [a-z] [A-Z]

[中文翻译]

3 Responses to “changing upper/lower case with tr”

  1. you need quotes on some linux (ubuntu)

    echo “UPPER” | tr “[A-Z]” “[a-z]”

  2. tr ‘[[:upper:]]’ ‘[[:lower:]]’

    or

    tr ‘[[:lower:]]’ ‘[[:upper:]]’

  3. Superb troubles once and for all, you recently Geigenunterricht Münster earned a new reader. Exactly what may well a person advocate when it comes to your distribute that you just produced few days earlier? Virtually any positive?

Leave a Reply