Created
March 26, 2012 21:39
-
-
Save amalrik/2209954 to your computer and use it in GitHub Desktop.
adicionar um prefixo a todos arquivos de um mesmo padrão de um diretorio e todos os subdiretorios
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PREFIX=xyz; | |
while read line | |
do | |
path="$(dirname $line)" | |
base="$(basename $line)"; | |
mv "${line}" "$path/${PREFIX}${base}" | |
done < <(find dir1 -name "*.c") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment