Aug 7, 2003 #1 johngiggs Technical User Oct 30, 2002 492 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 Apr 8, 2001 1,294 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 Oct 30, 2002 492 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 Apr 8, 2001 1,294 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 Jul 27, 2000 2,146 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 Nov 8, 2002 53,708 FR or awk '{print tolower($0)}' inputfile >outputfile Hope This Help PH. Upvote 0 Downvote