[LAD] [ot] capitalising words in a shell-script

Markus Schwarzenberg schwarzb at ipms.fraunhofer.de
Fri Sep 26 10:46:47 UTC 2008


On Fri, 26 Sep 2008 12:11:52 +0200 (CEST) Julien Claassen <julien at c-lab.de> wrote:

> Hello there!
>    Is there a nice and simple awk/sed trick to just capitalise a word? I didn't 
> come up with one so far. I could do it by hand, it's a known set of words, but 
> it would be nicer with a real word-independent mechanism.

the simplest trick i know of uses tr:

  echo word | tr a-z A-Z

the awk equivalent (?) is:

  echo word | gawk '{print toupper($0)}'


Markus




More information about the Linux-audio-dev mailing list