Article View: comp.unix.shell
Article #51Need script (awk/sed/...) to remove dashes and do initial caps
From: Kris Schneider
Date: Mon, 02 Nov 1992 19:56
Date: Mon, 02 Nov 1992 19:56
21 lines
1296 bytes
1296 bytes
Here are some examples of what needs to be done: hello-world => HelloWorld helloworld => Helloworld HELLOWORLD => Helloworld HELLO-WORLD => HelloWorld In other words, the first charatcer should be capitalized, any character following a dash should be capitalized, all others should be lower case, and all dashes should be removed. I have an awk script that will grab the "field" I need, but I'm stuck from there. Any help you can provide is greatly appreciated. Thanks in advance... FWIW, this is to help a porting effort from Lisp to C. Lisp was set up to treat everything as a capital, so this was really a non-issue. C, at least to my knowledge, is a bit less flexible in this regard. -- Kris A. Schneider EMail: kris.wbst129@xerox.com XRXMail: Kris:Wbst129:Xerox
Technical Details
Message-ID:
<1992Nov2.195646.27860@spectrum.xerox.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!ferkel.ucsb.edu!taco!gatech!swrinde!sdd.hp.com!caen!batcomputer!cornell!rochester!rocksanne!krisShow Full Headers
Complete Article Headers
Newsgroups: comp.unix.shell,comp.lang.misc Path: arc1-ca.pugleaf.net!sparky!uunet!ferkel.ucsb.edu!taco!gatech!swrinde!sdd.hp.com!caen!batcomputer!cornell!rochester!rocksanne!kris From: kris@xerox.com (Kris Schneider) Subject: Need script (awk/sed/...) to remove dashes and do initial caps Message-ID: <1992Nov2.195646.27860@spectrum.xerox.com> Sender: news@spectrum.xerox.com Reply-To: kris.wbst129@xerox.com Organization: Xerox X-Newsreader: Tin 1.1 PL4 Date: Mon, 2 Nov 1992 19:56:46 GMT Lines: 21