My script doesn't work. Variable $Node
doesn't work. Please check below error.
Nodes=(SV41)
for Node in $Nodes
do
NPAG1RESUCC=$((cat $logfile |awk '/$Node/{c=38} c-->0' | awk '/NPAG1RESUCC/{print $2}'))
done
Result error:
((cat ~/test.log |awk '/SV41/{c=38} c-->0' | awk '/NPAG1RESUCC/{print }')):division by 0 (error token is "~/test.log |awk '/SV41/{c=38} c-->0' | awk '/NPAG1RESUCC/{print }'))")