Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!njin!uupsi!sunic!tut!tukki.jyu.fi!tarvaine From: tarvaine@tukki.jyu.fi (Tapani Tarvainen) Newsgroups: comp.unix.questions Subject: Re: Copying Multiple Files Summary: how 'bout sed Message-ID: <1990May26.182215.27766@tukki.jyu.fi> Date: 26 May 90 18:22:15 GMT References: <23368@adm.BRL.MIL> <16512@phoenix.Princeton.EDU> <8210@jpl-devvax.JPL.NASA.GOV> Organization: University of Jyvaskyla, Finland Lines: 16 In article <23368@adm.BRL.MIL> rose@baby.swmed.utexas.edu (Rose Oguz) writes: >The original files have the same root name and different extensions. How >can I copy them to files with another root name while keeping the >extensions? Just for fun, here's yet another way: ls foo.* | sed 's/foo\(.*\)/mv foo\1 bar\1/' | sh Just about any such conversion can be done this way, although the command can get rather messy (nice way to convince novices that you're a *nix guru ...) -- Tapani Tarvainen (tarvaine@jyu.fi, tarvainen@finjyu.bitnet)