bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: COMMAND FOR CP


From: Bob Proulx
Subject: Re: COMMAND FOR CP
Date: Sat, 22 Apr 2006 10:01:05 -0600
User-agent: Mutt/1.5.9i

Eric Blake wrote:
> for f in *.GNT; do cp "$f" "${f/.GNT}.gnt"; done

(I probably would have used dirname.  :-)

I know the original poster asked about copying but I think renaming
makes more sense here.

  rename 's/.GNT$/.gnt/' *.GNT

The 'rename' utility is usually found with the perl package.  It is a
small perl script.

Bob




reply via email to

[Prev in Thread] Current Thread [Next in Thread]