| Bill Seivert 2005-04-27, 2:48 am |
|
Michael Heiming wrote:
> In comp.unix.shell Ed Morton <morton@lsupcaemnt.com>:
>
>
>
>
>
> [..]
>
>
>
>
>
>
> If you can live without redirecting stderr?
> vim file << EOF^J:%s/\<\(.\)\([^ ]*\)/\u\1\L\2/g^J:wq!EOF
>
>
>
>
>
> We don't know, the OP was just a single line.;)
>
>
>
>
>
>
> Exactly, this is the beauty about unix, there are always a couple
> of possible ways doing things, reminds me sometimes of a Lego
> construction set for kids that have grown up, somehow...;)
>
I know Sun OS has a capitalize program (though I'm not at work
to verify the name), but it has three modes (based on command
line options):
abcd -> ABCD
ABCD -> abcd
abcd -> Abcd
Reads stdin, converts, and prints to stdout.
Bill Seivert
|