Hello,

On Thu, Feb 10, 2000 at 09:44:04PM +0100, Marcelo E. Magallon wrote:
> >> Adam C Powell IV <[EMAIL PROTECTED]> writes:
> 
>  >    * I can't figure out how to do cp */*.o *.i as in, rename those files
>  >      to the same thing with .i instead of .o, so I can't make the static
>  >      lib work.
> 
> Use mmv, but it's "non standard". (don't ask me how, I just know it
> does this)
> 
> In bash (less non standard):
> 
> $ for object in *.o ; do mv $object ${object%.o}.i ; done
> 
> In general (standard but slower):
> 
> $ for object in *.o ;
>   do mv $object `echo $object | sed -e 's/\.o$/.i/'` ;
>   done

Actually, you can also use basename(1) so instead of `echo ...` put

`basename $object .o`.i

This will also work but it looks a little bit awkward (psychology or
habbits?):

`basename $object o`i

Dejan

> 
> 
>                               Marcelo
> 
> 
> --  
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

-- 

Dejan Muhamedagic   mailto:[EMAIL PROTECTED]
UNIX and Linux Support   mailto:[EMAIL PROTECTED]

Quant-X Service & Consulting Ges.m.b.H.  http://www.quant-x.com
Phn: +43 4212 90555-0     Fax: 90555-20    Free: +800 90555 000

Reply via email to