Last active
August 29, 2015 14:23
-
-
Save kimitoboku/98dc63e4443a12fdcec4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
i=0; | |
tail -f path | awk '{if(list[$1]=="done"){}else if(list[$1] == $4){print $1;list[$1]="done"}else{list[$1] = $4}}' | while read line | |
do | |
i=$(( i + 1 )) | |
echo "$i:$line" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment