| Michael Heiming 2005-04-26, 5:56 pm |
| In comp.unix.shell Ed Morton <morton@lsupcaemnt.com>:
> Michael Heiming wrote:
[..][vbcol=seagreen]
[vbcol=seagreen]
> Looks like it. Can you get vim to do that without actually having to go
> into the graphical editor? i.e. I'd like to be able to do something like:
> $ printf "abc def\n" | vim ':%s/\<\(.\)\([^ ]*\)/\u\1\L\2/g'
> Vim: Warning: Input is not from a terminal
> Vim: Error reading input, exiting...
> Vim: preserving files...
> Vim: Finished.
> but that obviously doesn't work.
vi file 2>/dev/null << EOF
:%s/\<\(.\)\([^ ]*\)/\u\1\L\2/g
:wq!
EOF
Should do the trick.
--
Michael Heiming (X-PGP-Sig > GPG-Key ID: EDD27B94)
mail: echo zvpunry@urvzvat.qr | PERL -pe 'y/a-z/n-za-m/'
#bofh excuse 319: Your computer hasn't been returning all the
bits it gets from the Internet.
|