eocanha

highlight-threads

Mar 5th, 2021
47
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.  
RAW Paste Data