Skip to content

Instantly share code, notes, and snippets.

@kokosing
Last active February 13, 2020 07:11
Show Gist options
  • Save kokosing/d85ab9a5bfbb3d555f4cf8388b7896fd to your computer and use it in GitHub Desktop.
Save kokosing/d85ab9a5bfbb3d555f4cf8388b7896fd to your computer and use it in GitHub Desktop.
Group logs by thread
while read line; do
thread=$(echo $line | awk '{ if (NF > 3) { print $3; } else {print "other";} print 'y';}');
echo $line >> $thread;
done < ../modified.logs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment