Advertisement
Guest User

Untitled

a guest
Mar 21st, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. APPNAME="firefox"
  4. pactl list sink-inputs |
  5. while IFS= read -r line; do
  6. #echo ${line}
  7. echo $line | grep 'Sink Input'
  8. if [ $? -eq 0 ]; then
  9. LATESTID=$(echo $line | egrep -o '[0-9]{1,9}')
  10. echo $LATESTID
  11. else
  12. # Search for specified APPNAME in process.binary
  13. echo $line | grep 'application.process.binary = "$APPNAME"'
  14. if [ $? -eq 0 ]; then
  15. echo $APPNAME $LATESTID
  16. break
  17. fi
  18. fi
  19. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement