Copying Multiple Files

Eduardo Krell ekrell at ulysses.att.com
Sun May 27 01:26:46 AEST 1990


In article <4a9c480e.12c9a at digital.sps.mot.com> chen at digital.sps.mot.com (Jinfu Chen) writes:

>I have yet to find a way in csh or bsh to do this simple task.

How about ksh?

function cpm { for f in ${1}.*; do cp $f $2${f#${f%.*}}; done }

Then all you have to say is "cpm foo bar".

    
Eduardo Krell                   AT&T Bell Laboratories, Murray Hill, NJ

UUCP: {att,decvax,ucbvax}!ulysses!ekrell  Internet: ekrell at ulysses.att.com



More information about the Comp.unix.wizards mailing list