[codesyntax lang=”bash” lines=”no” container=”pre” tab_width=”4″]
#!/bin/bash # perhaps the field to be analyted is the 2nd field log=/path/to/log; keyword=”the keyword”; cat $log | cut -f2 | grep $keyword | sort | uniq -c -i
[/codesyntax]
[codesyntax lang=”bash” lines=”no” container=”pre” tab_width=”4″]
#!/bin/bash # perhaps the field to be analyted is the 2nd field log=/path/to/log; keyword=”the keyword”; cat $log | cut -f2 | grep $keyword | sort | uniq -c -i
[/codesyntax]