srDFT_G2/Data/rename.sh

17 lines
198 B
Bash
Raw Normal View History

2018-12-04 15:15:01 +01:00
#!/bin/bash
set -e
if [ $# != 1 ]
then
echo "One argument required [OUTPUT] !!"
fi
if [ $# = 1 ]
then
OUTPUT=$1
for i in *.dat ; do MOL=${i%_*} ; mv $i ${MOL}_${OUTPUT}.dat ; done
fi