1 2 3 4 5 6 7 8
#!/bin/bash if [ -f /tmp/mpvout ]; then echo -n "mpv: " tail -1 /tmp/mpvout | tr -d '\n' else echo -n "mpv: stopped" fi