Using multiple Field Separators in AWK

Most of the time working with awk we require multiple field separators, e.g. from the o/p of ifconfig you require ip address , BCast address as well netmask you can get all these details in one go as below</p>

ifconfig eth0 | grep 'inet addr:' | awk -F '[: ]' '{print $13,$16,$19}' 

Here I am using the white space and colon both as field Separators </div>

comments powered by Disqus