#!/bin/bash #source ~/virtuals/virtual_schain3x/bin/activate echo "Amisr EEJ Online simulation" PATH_IN=/home/soporte/dataAMISR/20191216.001/ PATH_OUT=/home/soporte/dataAMISR_test/20191216.001/ count=0 for f in $PATH_IN* do if [ ${f: -3} == ".h5" ] then echo "coping $f" cp ${f} $PATH_OUT sleep 5m #it takes about 5 minutes to generate new data in AMISR radar fi ((count=count+1)) if [ $count -eq 21 ] #only transfer 20 files then echo " finish simulation" break fi done