Pregunta

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.

¿Fue útil?

Solución

Not really.

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

Otros consejos

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);}'
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top