create a file such as itunes_title.sh with the following contents

#!/bin/bash

while true; do
echo "$(osascript -e 'tell app "iTunes" to artist of current track & " - " & name of current track') - $(($(osascript -e 'tell app "iTunes" to finish of current track' | cut -d '.' -f1) - $(osascript -e 'tell app "iTunes" to player position' | cut -d '.' -f1)))";
sleep 1;
done