LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-08-2008, 03:52 PM   #1
ufmale
Member
 
Registered: Feb 2007
Posts: 385

Rep: Reputation: 30
Change all uppercase to lowercase with vi??


Can we change all uppercase characters to lowercase using vi, or any other technique may be easier?
 
Old 04-08-2008, 03:59 PM   #2
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware-current, Cross Linux from Scratch, Gentoo
Posts: 2,812
Blog Entries: 1

Rep: Reputation: 259Reputation: 259Reputation: 259
I'm using Vim, not Vi so you never know. But, guu will change all uppercase in a line to lower case. gUU goes the other way.

More commands here --> http://cross-lfs.org/~arowland/docs/vimtips.pdf
 
Old 04-08-2008, 04:16 PM   #3
prad77
Member
 
Registered: Mar 2008
Posts: 101

Rep: Reputation: 15
tr '[:upper:]' '[:lower:]' <file >newfile

Gentoo

Last edited by prad77; 04-17-2008 at 04:45 AM.
 
Old 05-06-2009, 04:32 PM   #4
Irenaeous
LQ Newbie
 
Registered: May 2009
Posts: 1

Rep: Reputation: 0
Change all uppercase to lowercase with vi?

Easy:

:%s/.*/\L&/

Conversely, :%s/.*/\U&/ will change all the characters to uppercase.
 
Old 07-05-2013, 05:16 AM   #5
naga9711
LQ Newbie
 
Registered: Jul 2013
Posts: 1

Rep: Reputation: Disabled
Thumbs up

Quote:
Originally Posted by Irenaeous View Post
Easy:

:%s/.*/\L&/

Conversely, :%s/.*/\U&/ will change all the characters to uppercase.
Thanks-- This worked
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
UPPERCASE to lowercase command? pk21 Linux - General 4 06-12-2007 11:26 AM
Lowercase to Uppercase stellafrank Linux - Software 2 11-16-2006 06:46 AM
rename script won't change uppercase to lowercase on fat32 pwc101 Programming 4 09-27-2006 06:16 PM
Converting Uppercase to Lowercase AMMullan Linux - Software 6 10-18-2005 08:32 PM
Converting lowercase to uppercase noodle123 Programming 1 05-17-2002 03:12 PM


All times are GMT -5. The time now is 12:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration