I am trying to add an array which is a word within a certain postion in my log file...
cat /var/log/messages | grep "read failure" | awk '{ip[$14]++}END{for(j in ip) print j,"ip[j]"}'
This works and shows me how many hits in my logs file i have had for the IP address ($14), but ideally instead of entering $14, i what to tell it, "its the word after client and space with that line"
Any help would be great ...
Fir3net.com
cat /var/log/messages | grep "read failure" | awk '{ip[$14]++}END{for(j in ip) print j,"ip[j]"}'
This works and shows me how many hits in my logs file i have had for the IP address ($14), but ideally instead of entering $14, i what to tell it, "its the word after client and space with that line"
Any help would be great ...
Fir3net.com