View difference between Paste ID: Me95PKMs and iMGRm3ZT
SHOW: | | - or go back to the newest paste.
1
diff --git a/channel_scan.sh b/channel_scan.sh
2
index ddf9df7..f83d535 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
+               print $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
+               print $4,$9 \
21
+               ,($9 * 60 / 100 - 60) \
22
+               ,($9 * 60 / 100 -60 -48.75) \
23-
+               ,$11,($11 / 100 * 33),$13,$15,(.000991 * $15 + 45.3),"\t"(.00991 * $15 + 45.3 - 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
 }