Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!samsung!emory!audfax!arnold From: arnold@audiofax.com (Arnold Robbins) Newsgroups: comp.unix.questions Subject: Re: merging 2 files Keywords: sed awk perl join Message-ID: <225@audfax.audiofax.com> Date: 9 May 90 16:40:03 GMT References: <757@sagpd1.UUCP> <102007@convex.convex.com> <7@stoat.warwick.ac.uk> <9192@tank.uchicago.edu> Organization: AudioFAX Inc., Atlanta Lines: 42 The original job: Convert FooBar blaTZ GRMblE WhEe into FooBar foobar blaTZ blatz GRMblE grmble WhEe whee A perl script was suggested: chop; print $_, " "; y/A-Z/a-z/; print $_, "\n"; Rob McMahon (cudcv@warwick.ac.uk) writes: I know perl is wonderful, and I do use it a lot, but I can't help feeling that tr '[A-Z]' '[a-z]' < file | lam file -s " " - is easier (if you have `lam' I suppose, but there's an "if you have `perl'" too ...). goer@sophist.UUCP (Richard Goerwitz) presents an Icon solution: procedure main() every line := !&input do write(line," ",map(line)) end And, just for completeness, the following works in gawk and V.4 awk: { print $1, tolower($1) } -- Arnold Robbins -- Senior Research Scientist - AudioFAX | Laundry increases 2000 Powers Ferry Road, #220 / Marietta, GA. 30067 | exponentially in the INTERNET: arnold@audiofax.com Phone: +1 404 933 7600 | number of children. UUCP: emory!audfax!arnold Fax: +1 404 933 7606 | -- Miriam Robbins