hello all.. I'm a bit new to this site.. and I hope to learn alot.. but I've been having a hard time figuring this out. I'm horrible with regular expressions.. so any help would be greatly appreciated.
I have a file with a list of names like this: LASTNAME, FIRSTNAME, MIDDLEINITIAL
how can I write a script to have the it: Firstname, Middleinitial, Lastname ?
I have around 30ish names. The first letter needs to be capitalized and the rest lowercase.. I've been having a horrible time trying to figure this out.. I would really appreciate some help with this.
I would not use a regular expression at all for this problem. I would just use ksh. It can easily read 3 words from a line and write them out in a different order. It can also split off a leading character from a word and there are plenty of example of that on this site. Look at ksh's "typeset -l" and "typeset -u" to automaticly enforce one case or another. At most, this looks like a 20 line ksh script.