Sort uniq IP address in from Apache log

前端 未结 5 520
伪装坚强ぢ
伪装坚强ぢ 2020-12-12 11:32

I\'m trying to extract IP addresses from my apache log, count them, and sort them.

And for whatever reason, the sorting part is horrible.

Here is the command

5条回答
  •  孤城傲影
    2020-12-12 12:10

    This should work

    cat access.* | awk '{ print $1 }' | sort | awk '{print $1 " " $2;}' | sort -n
    

    I can't see a problem.

    Control characters in the files?

    File system full (temp files)?

提交回复
热议问题