The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > OS X (Apple)
Google UNIX.COM


OS X (Apple) OS X is a line of Unix-based graphical operating systems developed, marketed, and sold by Apple.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Changing capitalization TheCrunge Shell Programming and Scripting 2 11-09-2005 07:23 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 11-16-2005
Registered User
 

Join Date: Nov 2005
Posts: 4
(OSX) Capitalization using tr

Mac OSX Terminal/Unix question
I would like to capitalize the words at the beggining of sentences using the tr command, im not sure if this is possible, if not please tell me another way, I oly have TextEdit, no auto capitalization so just having a quick Unix way 'round it would be great.
Reply With Quote
Forum Sponsor
  #2  
Old 11-21-2005
Registered User
 

Join Date: Jun 2005
Location: Middletown, PA
Posts: 63
Use VI

Backup your file first. Then from terminal, vi the file

vi /users/yourid/novel.txt

Then type the following

:%s/[.!?]\_s\+\a/\U&\E/g
Hit enter

That should work for you. Then type :wq and press enter. Your file is edited and saved.
Reply With Quote
  #3  
Old 11-21-2005
Registered User
 

Join Date: Nov 2005
Posts: 4
YAY! thankies!
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 01:38 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0