So I am supposed to find all the files in the given directory with surffix of .C or cc, and change their name to .C.blah or .cc.blah
Is there a command to do that?
Or should I implement this with the command find?
feedback
|
|
There are a few approaches, depending on what is available on your *nix. There two different Perl version:
utils version - you might be able to do this with one line:
for loop:
| |||
|
feedback
|
|
use a simple for-loop:
| |||
|
feedback
|
|
I know you already found your own acceptable solution, but I want to post what I would normally use at work. This syntax works for GNU findutils, which is part of any modern linux distro.
Especially with the now common quad-core SMP servers, you can usually half running time with | |||
|
feedback
|
|
There are two different On Ubuntu/Debian/... distros:
On RedHat/CentOS/... distros:
| |||
|
feedback
|