Advertisement
HiImTye

mpcPrevSong.sh

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