Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!wuarchive!cs.utexas.edu!rutgers!mcdchg!chinet!les From: les@chinet.chi.il.us (Leslie Mikesell) Newsgroups: comp.unix.questions Subject: Re: merging 2 files Keywords: sed awk perl join Message-ID: <1990May5.193350.3445@chinet.chi.il.us> Date: 5 May 90 19:33:50 GMT References: <757@sagpd1.UUCP> Reply-To: les@chinet.chi.il.us (Leslie Mikesell) Organization: Chinet - Chicago Public Access UNIX Lines: 23 In article <757@sagpd1.UUCP> jharkins@sagpd1.UUCP (Jim Harkins) writes: >For example, I want to convert the list >FooBar >blaTZ >into >FooBar foobar >blaTZ blatz >(from this second list it's trivial to create lines of sed commands like >'/FooBar/foobar/g', and there are around 800 words in my list) >So, has anyone got any advice (outside of having a flunky use vi :-)? How about having someone who isn't a flunky use vi, since the single command: :%s/.*/& \L&/ will do exactly what you ask, and a trivial variation would give the final output you want. Les Mikesell les@chinet.chi.il.us