<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">#!/bin/csh
#
# captsignal.csh --&gt; captures signal strength to stdout
#
# syntax:  ./runsignal.csh  &gt;&gt; DATA_FILE_NAME

loop:

  set timenow = `date +"%Y/%m/%d %H:%M:%S"`
  ./getsignal.exp &gt; getsignal.log

  @ db  = `grep "Strength  In" getsignal.log | awk '{ print substr($4,1,3) }' | head -1 | tail -1`
  @ db += `grep "Strength  In" getsignal.log | awk '{ print substr($4,1,3) }' | head -2 | tail -1`
  @ db += `grep "Strength  In" getsignal.log | awk '{ print substr($4,1,3) }' | head -3 | tail -1`
  @ db += `grep "Strength  In" getsignal.log | awk '{ print substr($4,1,3) }' | head -4 | tail -1`
  @ db += `grep "Strength  In" getsignal.log | awk '{ print substr($4,1,3) }' | head -5 | tail -1`

  @ db /= 5

  echo $timenow"  "$db
  sleep 2

  goto loop

</pre></body></html>