Question

From

abcd_if_vb.c
abcd_if_av.c

to

edfg_if_vb.c
edfg_if_av.c

The problem is to catch what file have abcd prefix.

Était-ce utile?

La solution

Not really.

for file in abcd*
do
  mv "$file" "edfg${file#abcd}"
done

Autres conseils

If you have rename, you can rename those files using

rename abcd_ edfg_ abcd*
ls -1 abcd*|awk '{f=$0;gsub(f,"abcd","efgh");system("mv "$0" "f);}'
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top