Convert 'a' to 'A' in a Shell-Script
Rick Silverstein
ricks at ncrcae.Columbia.NCR.COM
Thu Jan 31 07:31:26 AEST 1991
In article <888 at kivax.UUCP> koe at kivax.UUCP (Diana Koehler) writes:
>
>
>How can I convert "lowercase" characters in "uppercase" characters
>in a Shell-Script.
>f.e. convert all 'a' to 'A' ?
>(awk, sed ??)
>
/usr/bin/tr works well for me. Use the syntax: tr "[a-z]" "[A-Z]"
This reads from stdin and writes to stdout, mapping a to A, b to B, ...
and z to Z so 'echo hello | tr "[a-z]" "[A-Z]"' outputs HELLO.
More information about the Comp.unix.questions
mailing list