Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!samsung!emory!hubcap!ncrcae!ricks From: ricks@ncrcae.Columbia.NCR.COM (Rick Silverstein) Newsgroups: comp.unix.questions Subject: Re: Convert 'a' to 'A' in a Shell-Script Message-ID: <7019@ncrcae.Columbia.NCR.COM> Date: 30 Jan 91 20:31:26 GMT References: <888@kivax.UUCP> Reply-To: ricks@ncrcae.Columbia.NCR.COM (Rick Silverstein) Organization: NCR Corp., Engineering & Manufacturing - Columbia, SC Lines: 12 In article <888@kivax.UUCP> koe@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.