Hi guys, could someone help me ...
Got a function, see below, I would like to search using the line
" if (/warning/ || /error/ || /emer/) "
I was hoping that the || would mean OR, but not appearing to work.
Anyhelp greatfully received.
Martin
grep "loading volume" $(echo $DAEMONLOG) | ${AWKPATH}/awk '{print $NF}' | sort -u |sed -e "s/:\\\\/.*/" |while read TAPE
do
grep $TAPE $(echo $DAEMONLOG) | ${AWKPATH}/awk '{
if(/[AP]M .*loading volume/){
vol=$9;
}else {if(/loading volume/){vol=$8}}
#Extra if statement (above) due to bug in Networker where date can occasionlly appear in 12 hr format
#and produce an extra field (AM/PM)
if (/warning/ || /error/ || /emer/){
print vol,$0;
}
}'
done |sed -e "/^[ ].*/d" >&3
Got a function, see below, I would like to search using the line
" if (/warning/ || /error/ || /emer/) "
I was hoping that the || would mean OR, but not appearing to work.
Anyhelp greatfully received.
Martin
grep "loading volume" $(echo $DAEMONLOG) | ${AWKPATH}/awk '{print $NF}' | sort -u |sed -e "s/:\\\\/.*/" |while read TAPE
do
grep $TAPE $(echo $DAEMONLOG) | ${AWKPATH}/awk '{
if(/[AP]M .*loading volume/){
vol=$9;
}else {if(/loading volume/){vol=$8}}
#Extra if statement (above) due to bug in Networker where date can occasionlly appear in 12 hr format
#and produce an extra field (AM/PM)
if (/warning/ || /error/ || /emer/){
print vol,$0;
}
}'
done |sed -e "/^[ ].*/d" >&3