Date: Fri, 16 Sep 2005 21:37:11 -0500 From: Kevin Kinsey <kdk@daleco.biz> To: infofarmer@gmail.com Cc: questions@freebsd.org Subject: Re: how to convert lower case to uppercase in a word in a line ? Message-ID: <432B8157.1030803@daleco.biz> In-Reply-To: <cb52064205091610087a76e1f4@mail.gmail.com> References: <015201c5bad6$78eaf940$dc96eed5@ihlasnetym> <20050916161035.GA14183@kuckucksei.jogla> <cb52064205091610087a76e1f4@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Andrew P. wrote: >On 9/16/05, Jonathan Glaschke <no-html@jonathan-glaschke.de> wrote: > > >>Hello, >>On Fri, Sep 16, 2005 at 06:51:16PM +0300, Yavuz Maslak wrote: >> >> >>>Hello >>> >>>There is a word that consists lowercases. >>>How to change all of letters capital letters in stead of lowercase ? >>>is there any script about that ? >>>Thanks >>>_______________________________________________ >>> >>> >>Or you do this using perl: >> >>$ perl -e 'chomp && system("mv $_ ".uc($_)) foreach `ls`;' >> >> >> > >sed, awk, python, php, ruby, <whatever> versions are to follow >shortly :) > > As requested: [kadmin@archangel][/www] # echo "foo" | sed 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' FOO [kadmin@archangel][/www] # echo "foo" | awk '{print toupper($1)}' FOO [kadmin@archangel][/www] # python -c "import string; i='foo'; o=str.upper(i); print(o);" FOO [kadmin@archangel][/www] # php -r 'echo strtoupper("foo");' FOO [kadmin@archangel][/www] # echo foo | ruby -p -e '$_.tr! "a-z", "A-Z"' FOO I don't know <whatever> and can't find it in the manpages or at Google. I have heard of INTERCAL and BrainF*ck, but who cares.... next? :-D KDK P.S. In my opinion, PHP wins. But I'm sure my knowledge of PHP is the best of the five....
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?432B8157.1030803>