[WT-support] divided a log
Laurent HAAS - F6FVY
f6fvy at free.fr
Tue Jan 16 02:51:34 CET 2007
Hi Peter
Peter a écrit :
> Is there a simple way to split multi/multi log to a log by band?
Please find below a quick dirty awk script to split a Cabrillo file into
6 files, one for each band :
# splitCab script to split a Cabrillo file
# in 6 files : one Cabrillo file per band
#
# (C) F6FVY Jan 2007
#
# Usage : (g)awk -f splitCab.awk myLog.log
#
BEGIN {
# Remove the file extension (assume one stop char only in the filename)
inFile = substr(ARGV[1], 1, index(ARGV[1], "."))
}
{
if ($0 ~ /^QSO:/) # QSO line
{
if ($2 >= 1800 && $2 <= 2000)
print $0 > (inFile "_160.log")
else if ($2 >= 3500 && $2 <= 4000)
print $0 > (inFile "_80.log")
else if ($2 >= 7000 && $2 <= 7300)
print $0 > (inFile "_40.log")
else if ($2 >= 14000 && $2 <= 14350)
print $0 > (inFile "_20.log")
else if ($2 >= 21000 && $2 <= 21450)
print $0 > (inFile "_15.log")
else if ($2 >= 28000 && $2 <= 29700)
print $0 > (inFile "_10.log")
}
else # Non-QSO line
{
print $0 > (inFile "_160.log")
print $0 > (inFile "_80.log")
print $0 > (inFile "_40.log")
print $0 > (inFile "_20.log")
print $0 > (inFile "_15.log")
print $0 > (inFile "_10.log")
}
}
It's a matter of milliseconds to execute ;-)
You can find gawk and many other GNU utilities for Win32 here :
http://unxutils.sourceforge.net/
> Or is there a simple way to make statistics per band from a multi multi
> log?
It depends on the required stats. Don't forget that you can copy as text
any chart displayed in the stats window (Ctrl-F9), but using the
appropriate contextual menu item.
73
Larry - F6FVY
More information about the Support
mailing list