richclever
IS-IT--Management
I have an email that come in every day and need to pass it to an awk script. I have a filter that picks up the email, and it should then process the file and output to another one.
The problem I have is that it is just adding it to the end of the awk script I have.
The script looks like this:
#!/usr/bin/awk -f
BEGIN {
OUTPUTFILE="/path_to_ouputfile/currency_rates.dat"
print strftime("%d/%m/%y %H:%M:%S",systime()) > OUTPUTFILE
}
$1 ~ /^(USD|GBP|EUR)$/ {
print $1 " " $(NF-1) >> OUTPUTFILE
}
Does anyone have anyidea what is going wrong.
Thanks
Rich
The problem I have is that it is just adding it to the end of the awk script I have.
The script looks like this:
#!/usr/bin/awk -f
BEGIN {
OUTPUTFILE="/path_to_ouputfile/currency_rates.dat"
print strftime("%d/%m/%y %H:%M:%S",systime()) > OUTPUTFILE
}
$1 ~ /^(USD|GBP|EUR)$/ {
print $1 " " $(NF-1) >> OUTPUTFILE
}
Does anyone have anyidea what is going wrong.
Thanks
Rich