Hey guys,
Can you please help me solve this problem. These statements run fine on their own but I'd like to combine them into one. I can't seem to get it to work. Any guidance would be great.
Thanks!
# First statement
egrep -w 'Deny TCP|Deny UDP' $FW_LOG | awk '{print $1 " " $2 " " $3}' >> $OUTFILE
#Output
TCP 109.75.171.98:80 in
TCP 210.128.108.48:80 in
===================
# Second statement
echo 109.75.171.98 | geo
echo 210.128.108.48 | geo
#Output
Japan
United Kingdom
What I'd like to do is combine the 2 commands above so the output looks like this -
TCP 109.75.171.98:80 in Japan
TCP 210.128.108.48:80 in United Kingdom
Can you please help me solve this problem. These statements run fine on their own but I'd like to combine them into one. I can't seem to get it to work. Any guidance would be great.
Thanks!
# First statement
egrep -w 'Deny TCP|Deny UDP' $FW_LOG | awk '{print $1 " " $2 " " $3}' >> $OUTFILE
#Output
TCP 109.75.171.98:80 in
TCP 210.128.108.48:80 in
===================
# Second statement
echo 109.75.171.98 | geo
echo 210.128.108.48 | geo
#Output
Japan
United Kingdom
What I'd like to do is combine the 2 commands above so the output looks like this -
TCP 109.75.171.98:80 in Japan
TCP 210.128.108.48:80 in United Kingdom