Aug 7, 2003 #1 johngiggs Technical User Joined Oct 30, 2002 Messages 492 Location US I have forgotten how to change all uppercase letters in a file to lowercase using vi and sed. Can someone please refresh my memory? Thanks, John
I have forgotten how to change all uppercase letters in a file to lowercase using vi and sed. Can someone please refresh my memory? Thanks, John
Aug 7, 2003 #2 CaKiwi Programmer Joined Apr 8, 2001 Messages 1,294 Location US vi :%s/.*/\L&/ CaKiwi "I love mankind, it's people I can't stand" - Linus Van Pelt Upvote 0 Downvote
Aug 7, 2003 Thread starter #3 johngiggs Technical User Joined Oct 30, 2002 Messages 492 Location US Can someone please tell me how to do it with sed? I think it's something like: sed 's/[A-Z]/[a-z]/g' Thanks, John Upvote 0 Downvote
Can someone please tell me how to do it with sed? I think it's something like: sed 's/[A-Z]/[a-z]/g' Thanks, John
Aug 7, 2003 #4 CaKiwi Programmer Joined Apr 8, 2001 Messages 1,294 Location US try y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ Check my typing to make sure I got all the letters on order or use tr '[A-Z]' '[a-z]' CaKiwi "I love mankind, it's people I can't stand" - Linus Van Pelt Upvote 0 Downvote
try y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ Check my typing to make sure I got all the letters on order or use tr '[A-Z]' '[a-z]' CaKiwi "I love mankind, it's people I can't stand" - Linus Van Pelt
Aug 7, 2003 #5 vgersh99 Programmer Joined Jul 27, 2000 Messages 2,146 Location US tr '[A-Z]' '[a-z]' < file.txt vlad +----------------------------+ | #include<disclaimer.h> | +----------------------------+ Upvote 0 Downvote
tr '[A-Z]' '[a-z]' < file.txt vlad +----------------------------+ | #include<disclaimer.h> | +----------------------------+
Aug 7, 2003 #6 PHV MIS Joined Nov 8, 2002 Messages 53,708 Location FR or awk '{print tolower($0)}' inputfile >outputfile Hope This Help PH. Upvote 0 Downvote