(OSX) Capitalization using tr

 
Thread Tools Search this Thread
Operating Systems OS X (Apple) (OSX) Capitalization using tr
# 1  
Old 11-16-2005
(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.
# 2  
Old 11-21-2005
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  
Old 11-21-2005
YAY! thankies!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. OS X (Apple)

Osx terminal

hi all, first off thesis my first post so if i am not in the right forum, i apologize. i'm an absolute newbie to unix. i've been reading my books and studying my crib sheets etc. but... :/ i want to accomplish two things. 1. search and remove duplicate files i.e.. audio, doc alias etc.... (1 Reply)
Discussion started by: monkeyhateclean
1 Replies

2. OS X (Apple)

OSX and Kerberos

Our Network Security folks have mandated that we "Kerberize" our systems to allow them to perform an authenticated scan. This consists of instructions to change /etc/pam.d/sshd from: # sshd: auth account password session auth optional pam_krb5.so use_kcminit auth optional ... (0 Replies)
Discussion started by: jnojr
0 Replies

3. OS X (Apple)

OSX 10.7 and rsh

Hi Guys What do i need to change so that anyone can rsh into the machine, i am sure it is in the pam.d/rshd buti am hving and issue wiith it, at the moment only someone who has a pysical account on the machine can rsh in even with all the users in the passwd file it does not work ... (2 Replies)
Discussion started by: ab52
2 Replies

4. Shell Programming and Scripting

simple Word Capitalization (Title) find/replace

Hi! I'm looking for a simple script, especially a one liner script in tcsh or bash that will emulate the find/replace in all text apps. I want to change all uppercase caracters to Title word (in wich only the first caracter is UpperCase and the rest is lowercase) I can use sed command, but... (2 Replies)
Discussion started by: sstpierre68
2 Replies

5. OS X (Apple)

upgraded to OSX 10.6.6 - cannot sudo

I've been using "sudo" inside Terminal. I just upgraded to 10.6.6 and now "sudo" gives me incorrect password errors. My user is an admin user, so i can install etc on GUI but unable to do anything in terminal. 1. I did a repair permissions and restarted but cannot sudo. 2. i had an... (0 Replies)
Discussion started by: sentinel
0 Replies

6. OS X (Apple)

Optimizing OSX

Hi forum, I'm administrating a workstation/server for my lab and I was wondering how to optimize OSX. I was wondering what unnecessary background tasks I could kick off the system so I free up as much memory and cpu power. Other optimization tips are also welcome (HD parameters, memory... (2 Replies)
Discussion started by: deiphon
2 Replies

7. Programming

multithreading on OSX

Hi all, I have a query about multithreading. What I would like to do is, at the start of my main update() function, start a couple of threads in parallel, once they are all complete carry on with my main update function. void update() { thread1->update(); // fluid solver ... (3 Replies)
Discussion started by: memoid
3 Replies

8. Shell Programming and Scripting

Changing capitalization

How would I go about taking a string, such as a name (first last) and changing the capitalization of the first letter of each name (First Last)? A script that I am using outputs a list of names in all lower case, and I need to process the whole list to a new outfile giving the new... (2 Replies)
Discussion started by: TheCrunge
2 Replies

9. UNIX Desktop Questions & Answers

Mac Osx.2

I finally broke down and decided to buy a new piece of hardware. I think I made the right decision when I chose an Apple iBook - OSX is incredible! I haven't used a Mac since System7.5, and 10.2 is just blowing me away! Best of all, it's easy to use for people who are not used to Mac, but if I... (5 Replies)
Discussion started by: LivinFree
5 Replies

10. UNIX for Dummies Questions & Answers

Mac OSX vs. UNIX

To anyone that has the answer: What does UNIX have that Mac OSX doesn't. I am a programmer, and I am wondering if I could just get Mac OSX for my programming needs instead of UNIX. But my major question is what does UNIX have that Mac OSX doesn't. Thank you if you have the answer, and are willing... (2 Replies)
Discussion started by: REM
2 Replies
Login or Register to Ask a Question