Guest User

Untitled

a guest
Apr 11th, 2015
212
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. diff --git a/channel_scan.sh b/channel_scan.sh
  2. index ddf9df7..5f70319 100755
  3. --- a/channel_scan.sh
  4. +++ b/channel_scan.sh
  5. @@ -281,10 +281,18 @@ DebugOutput () {
  6.  
  7. echo -e "RF\tStrngth\tdBmV\tdBm\tQuality\tSNR\tSymbol\tdbg\tCalc_dBmV\tCalc_dBm"
  8. printf '%.0s-' {1..92}; echo
  9. - awk -v OFS='\t' '{print $4,$9 \
  10. - ,($9 * 60 / 100 - 60) \
  11. - ,($9 * 60 / 100 -60 -48.75) \
  12. - ,$11,($11 / 100 * 33),$13,$15,(.14 * $15 + 58.8),"\t"(.14 * $15 + 58.8 - 48.75)}' \
  13. + awk -v OFS=$'\t' '{\
  14. + if (length($15) < 5) {\
  15. + printf "%u\t%u\t%3.1f\t%3.1f\t%u\t%2.1f\t%u\t%s\t%2.1f\t\t%2.1f\n", $4,$9 \
  16. + ,($9 * 60 / 100 - 60) \
  17. + ,($9 * 60 / 100 -60 -48.75) \
  18. + ,$11,($11 / 100 * 33),$13,$15,(.14 * $15 + 58.8),"\t"(.14 * $15 + 58.8 - 48.75)\
  19. + } else {
  20. + printf "%u\t%u\t%3.1f\t%3.1f\t%u\t%2.1f\t%u\t%s\t%2.1f\t\t%2.1f\n", $4,$9 \
  21. + ,($9 * 60 / 100 - 60) \
  22. + ,($9 * 60 / 100 -60 -48.75) \
  23. + ,$11,($11 / 100 * 33),$13,$15,(.00991 * $15 + 45.3),"\t"(.00991 * $15 + 45.3 - 48.75)}
  24. +}' \
  25. <<< "$ScanResults" \
  26. | sort -n
  27. }
RAW Paste Data