BASH AWK
From Indie IT Wiki
Revision as of 12:31, 22 March 2016 by imported>Indieit
HOWTO: AWK:
PRINT TABS
awk '{print FNR "\t" $1 "\t" $2}'
SEARCH A COLUMN
awk '/proftpd.*Login successful/{print $7}' secure |sort |uniq -c |sort -nr
awk '{print FNR "\t" $1 "\t" $2}'
awk '/proftpd.*Login successful/{print $7}' secure |sort |uniq -c |sort -nr