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

From: Markus Schwarzenberg <schwarzb@email-addr-hidden>
Date: Fri Sep 26 2008 - 13:46:47 EEST

On Fri, 26 Sep 2008 12:11:52 +0200 (CEST) Julien Claassen <julien@email-addr-hidden-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

_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo/linux-audio-dev
Received on Fri Sep 26 16:15:03 2008

This archive was generated by hypermail 2.1.8 : Fri Sep 26 2008 - 16:15:03 EEST