Main Page/IT/text processing/awk

From Lewis Consultancy Wiki
Jump to: navigation, search

print a column

ping  $(ip route |awk '/default/{print $3}')

Pings the default gateway as found from ip route.