#!/bin/bash
#mocp --info | grep ^File:
#mocp --info | grep ^Title:
#mocp --info | grep ^TimeLeft:

songtitle=`mocp --info | grep ^SongTitle: | cut -c 11-`
artist=`mocp --info | grep ^Artist: | cut -c 8-`
timeleft=`mocp --info | grep ^TimeLeft: | cut -c 10-`

if [ "" == "$songtitle" ]; then
#  echo test
  songtitle=`mocp --info | grep ^File: | grep -o "[^/]*\." | grep -o ".*[^\.]"`
fi

echo $artist
echo $songtitle
echo $timeleft