25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 
 
 

26 satır
1.3 KiB

  1. #!/bin/bash
  2. PREDICTION_START=`/usr/bin/predict -t /home/pi/predict/weather.tle -p "${1}" | head -1`
  3. PREDICTION_END=`/usr/bin/predict -t /home/pi/predict/weather.tle -p "${1}" | tail -1`
  4. var2=`echo $PREDICTION_END | cut -d " " -f 1`
  5. MAXELEV=`/usr/bin/predict -t /home/pi/predict/weather.tle -p "${1}" | awk -v max=0 '{if($5>max){max=$5}}END{print max}'`
  6. while [ `date --date="@${var2}" +%D` == `date +%D` ]; do
  7. START_TIME=`echo $PREDICTION_START | cut -d " " -f 3-4`
  8. var1=`echo $PREDICTION_START | cut -d " " -f 1`
  9. var3=`echo $START_TIME | cut -d " " -f 2 | cut -d ":" -f 3`
  10. TIMER=`expr $var2 - $var1 + $var3`
  11. OUTDATE=`date --date="TZ=\"UTC\" $START_TIME" +%Y%m%d-%H%M%S`
  12. if [ $MAXELEV -gt 19 ]
  13. then
  14. echo ${1//" "}${OUTDATE} $MAXELEV
  15. echo "/home/pi/receive.sh \"${1}\" $2 ${1//" "}${OUTDATE} /home/pi/predict/weather.tle $var1 $TIMER" | at `date --date="TZ=\"UTC\" $START_TIME" +"%H:%M %D"`
  16. fi
  17. nextpredict=`expr $var2 + 60`
  18. PREDICTION_START=`/usr/bin/predict -t /home/pi/predict/weather.tle -p "${1}" $nextpredict | head -1`
  19. PREDICTION_END=`/usr/bin/predict -t /home/pi/predict/weather.tle -p "${1}" $nextpredict | tail -1`
  20. MAXELEV=`/usr/bin/predict -t /home/pi/predict/weather.tle -p "${1}" $nextpredict | awk -v max=0 '{if($5>max){max=$5}}END{print max}'`
  21. var2=`echo $PREDICTION_END | cut -d " " -f 1`
  22. done