Skip to content

Instantly share code, notes, and snippets.

@negima1976
Created May 1, 2012 06:23
Show Gist options
  • Select an option

  • Save negima1976/2565566 to your computer and use it in GitHub Desktop.

Select an option

Save negima1976/2565566 to your computer and use it in GitHub Desktop.
ログファイルの行数を日付ごとに出力
#/usr/bin/gawk -f
BEGIN {
for (i = 1;i < ARGC;i ++) {
cnt = 0;
while(getline < ARGV[i] > 0) {
cnt ++;
}
print ARGV[i]":"cnt
}
}
@negima1976
Copy link
Author

awk -f daily_log_count.awk logfile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment