[sf-lug] convert to lowercase
Asheesh Laroia
asheesh at asheesh.org
Mon Sep 17 12:48:37 PDT 2007
On Mon, 17 Sep 2007, Alden Meneses wrote:
> Hello All,
>
> I was wondering if anyone knew how to convert a text file to all
> lowercase.
A standard way to do it uses the tr command. For example:
paulproteus at alchemy:/tmp/hash_crack $ cat /etc/motd
Linux alchemy.localdomain 2.6.20-15-generic #2 SMP Sun Apr 15 07:36:31 UTC
2007 i686
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
Whereas with a simple 'tr' filter:
paulproteus at alchemy:/tmp/hash_crack $ cat /etc/motd | tr [A-Z] [a-z]
linux alchemy.localdomain 2.6.20-15-generic #2 smp sun apr 15 07:36:31 utc
2007 i686
the programs included with the ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
ubuntu comes with absolutely no warranty, to the extent permitted by
applicable law.
-- Asheesh.
--
This is Unix we're talking about, remember. It's not supposed to be
nice for the applications programmer.
-- Matthew Danish on debian-devel
More information about the sf-lug
mailing list