I have written an AWK programme that scans my ascii outputs for specific events, in my case freeze/thaw damage. It can be easily rewritten to look for different events.
I am happy to share this with anyone that needs it.
Best
Dan
interpreting results
-
- WUFI User
- Posts: 20
- Joined: Mon May 25, 2009 1:12 am -1100
- Location: London, England
-
- WUFI User
- Posts: 20
- Joined: Mon May 25, 2009 1:12 am -1100
- Location: London, England
Hi Moritz,
See AWK below.
$ denotes which column of the ascii file to look at, in the example below I am looking for below zero events in column 3 coinciding with a water content above 208 in column 4. Change accordingly.
If you need any help with it let me know
Best
Dan
my AWK '208':
{
gsub(/E\+000/,"e"); gsub(/E\-000/,"e-") # gets rid of excess zeros, note \ is to define "+" as a charcater not an action
#print $0
if (TOld>=0 && $3<0 && $4>208) print int($1/24),$3/1,$4/1 # checks if temperature drops below zero and prints ref, temp and water
TOld=$3 # resets temperature
}
See AWK below.
$ denotes which column of the ascii file to look at, in the example below I am looking for below zero events in column 3 coinciding with a water content above 208 in column 4. Change accordingly.
If you need any help with it let me know
Best
Dan
my AWK '208':
{
gsub(/E\+000/,"e"); gsub(/E\-000/,"e-") # gets rid of excess zeros, note \ is to define "+" as a charcater not an action
#print $0
if (TOld>=0 && $3<0 && $4>208) print int($1/24),$3/1,$4/1 # checks if temperature drops below zero and prints ref, temp and water
TOld=$3 # resets temperature
}