year=2022
stat=GRA1
cd="/data/geobs/MHE/GRA1"
#cd="/home/vialb/TEMPORARY/GRA1/CSI"
cd $cd


for table in soh extenso soleil
	do
	for j in {001..366}
		do
		#GRA1_049_2021-02-18_soh.dat
		#OGS3_327_2021-11-23_soh.dat
		file=`echo ${stat}_${j}_${year}*${table}.dat`
		date=`echo $file | awk -F '_' {'print $3"_"$4'}`
		newfile=`echo ${stat}_${year}_${j}_${date}`
		echo -e "$file\n$newfile"
		mv $file $newfile

	done

done




