Advertisement
ciusss89

cm.sh

Jun 25th, 2013
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.83 KB | None | 0 0
  1. #!/bin/bash
  2. # script /usr/local/sbin/cm.sh
  3. # TIPALDI GIUSEPPE 7-2013
  4.  
  5. # VAR;
  6. RUN="1"
  7.  
  8. date1=$(date +"%s")
  9. echo "Init del sistema.. "
  10. cpu-control.sh
  11. gnss-flash.sh; sleep 5;
  12. cd /mnt/sd/
  13. date2=$(date +"%s"); diff=$(($date2-$date1))
  14.  
  15. echo "TEMPO FASE DI INIT: Minuti: $(($diff / 60)) Secondi: $(($diff % 60))."
  16.  
  17. read -p "Quanti secondi acquisire : " TIME
  18. read -p "Quanti iterazioni compiere : " CNT
  19. read -p "Ritardo tra ogni acquisione in secondi : " DLY  
  20.  
  21. while [ RUN MINORE DI CNT ]
  22. do
  23.    date1=$(date +"%s")
  24.    echo "ITERAZIONE NUMERO $RUN"
  25.    NOME_FILE=`echo raw_$TIME_second_+$RUN.bin`
  26.    gn3s -s $TIME -o $NOME_FILE;
  27.    RUN=`(echo " 1 + $RUN" | bc)`
  28.    CNT=`(echo " 1 + $CNT" | bc)`
  29.    sleep DLY
  30.    date2=$(date +"%s"); diff=$(($date2-$date1)); echo "TEMPO IMPIEGATO: $(($diff / 60)) Secondi: $(($diff % 60))."
  31. done
  32. sync
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement