Advertisement
msjche

mpdPrevious

Aug 13th, 2013
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.16 KB | None | 0 0
  1. #/bin/sh
  2.  
  3. test=$(mpc | grep -Eo '[0-9]+:[0-9][0-9]/' | sed 's|\([0-9].*\):\([0-9][0-9]\)/|\1\2|')
  4. if [ "$test" -ge 5 ]; then
  5. mpc seek 0
  6. else
  7. mpc prev
  8. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement