Using awk to filter text files for specific columns of information
Posted by on 2014-09-19 13:51:43:
Using awk to filter specific information.
# print column one using space as a separator
grep/var/log/maillog.1 | awk '{print $1}'
# print column four using : as a separator
grep/var/log/maillog.1 | awk -F ":" '{print $4}'
Use grep -i for case insensitive search.
Tags: Text manipulation , AWK , Linux
Return to home page: Home