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