![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| OS X (Apple) OS X is a line of Unix-based graphical operating systems developed, marketed, and sold by Apple. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Changing capitalization | TheCrunge | Shell Programming and Scripting | 2 | 11-09-2005 07:23 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
(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. |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
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. |
|
#3
|
|||
|
|||
|
YAY! thankies!
|
|||
| Google The UNIX and Linux Forums |