homepage Welcome to WebmasterWorld Guest from 54.204.127.56
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
Forum Library, Charter, Moderators: bakedjake

Linux, Unix, and *nix like Operating Systems Forum

    
all lowercase text
SlowMove




msg:907493
 9:06 pm on Dec 21, 2003 (gmt 0)

i'm new to linux. does anyone have a simple script to open up a text file and convert all the characters to lowercase?

 

dingman




msg:907494
 9:37 pm on Dec 21, 2003 (gmt 0)

Nope, but it'd be really easy to write in Perl.


#/usr/bin/perl -w
while (<STDIN>) {
print lc($_);
}

$ cat textfile name-of-perl-file > lowercasefile

The above code is completely off-the-cuff, and Perl is not my primary language. It might destroy everything on your computer, or do nothing.

SlowMove




msg:907495
 9:41 pm on Dec 21, 2003 (gmt 0)

It probably won't do any damage. I'll try it. Thanks.

andrew_m




msg:907496
 12:04 am on Dec 22, 2003 (gmt 0)

perl -ne 'print lc' yourfile.txt

tr '[A-Z]' '[a-z]' < yourfile.txt

and probably a dozen other ways..

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved