Advertisement
eocanha

highlight-threads

Mar 5th, 2021
914
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.34 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # This script finds all the thread ids in a GStreamer log and highlights each
  4. # of them with a different color
  5.  
  6. TMPFILE=$(mktemp /tmp/highlight-threads.XXXXXXXXX)
  7. cat > $TMPFILE
  8. cat $TMPFILE | h -n $(cat $TMPFILE | remove-ansi-colors.sh | cut -c 25-34 | egrep '0x[0-9a-f]+' | sed -re 's/[ ]+//' | sort | uniq)
  9. rm $TMPFILE
  10.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement