Rename files in Unix
From Rizzo_Lab
rename.sh
#!/bin/bash for file in *rec.nohydrogens.pdb do code=`echo $file|awk -F"." '{print $1}'` name=$code.rec.moe.pdb mv $file $name done
rename.sh
#!/bin/bash for file in *rec.nohydrogens.pdb do code=`echo $file|awk -F"." '{print $1}'` name=$code.rec.moe.pdb mv $file $name done