merging 2 files

iann at cmsfl iann at cmsfl
Mon May 7 15:53:16 AEST 1990


In article <757 at sagpd1.UUCP> jharkins at sagpd1.UUCP (Jim Harkins) writes:
>I need to change a lot of words with mixed upper and lower case letters into
>words of all lower case letters, from there I'm going to make a sed script
>to actually modify the words in our source.  So how do I make my list?

I often use the following with vi under minix and SysV.2, and I've had no
problems with vi taking commands from a file, like some have mentioned.  Maybe
they were BSD sites, or maybe only NCR SysV works.

	 echo 's/.*/& \\L&/' | vi file

The \L& translates the match into lower case (and \U& to upper case).  It's
documented somewhere in the vi manual.  I've just checked, and sed doesn't do
it.  The drawbacks are that maybe some vi's don't do it, and unless you
supress stdout (or stderr?), the screen gets messy.
-- 
"He who laughs, lasts"
Ian Nicholls         Phone : +61 3 829 6088   Fax: +61 3 829 6860
Coles/Myer Ltd.      UUCP: labtam!cmsfl!iann  Email: iann%cmsfl at labtam.oz.au
L1 M11, PO Box 2000, Tooronga 3146, Australia



More information about the Comp.unix.questions mailing list