srDFT_G2/Data/rename.sh
Pierre-Francois Loos 813602bcf6 Initial commit
2018-12-04 15:15:01 +01:00

17 lines
198 B
Bash
Executable File

#!/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