Saori Yoshimoto work notes since 2018

Friday, January 11, 2019

[script-shell] filename replace

It works for based on Bash(Linux).
ex). execution method
1(file name): rename_replace.sh
2(exetcute ): ./rename_replace.sh  
-----------------------------------------------
find . -type f -name '*.hipnc' | while read FILE ; do
    newfile="$(echo ${FILE} |sed -e 's/siy/sri/g')" ;
    mv "${FILE}" "${newfile}" ;
done


-about sort command
https://eng-entrance.com/linux-command-sort

-about sed command
https://eng-entrance.com/linux-shellscript-replacement