Don't use -r switch on sed as it's not portable

This commit is contained in:
Alexander Greim 2016-07-13 11:28:36 +02:00
parent 9d28be4f06
commit a276e8d731

View File

@ -7,7 +7,7 @@ while [ $# -gt 0 ]; do
ffmpeg -i "$FILE" 2> tmp.txt ffmpeg -i "$FILE" 2> tmp.txt
TITLE=`grep -a -m1 -h -r "title" tmp.txt | head -1 | cut -d: -f2- | xargs` TITLE=`grep -a -m1 -h -r "title" tmp.txt | head -1 | cut -d: -f2- | xargs`
TITLE=`echo $TITLE | sed -r 's/\(Unabridged\)//' | xargs` TITLE=`echo $TITLE | sed -e 's/(Unabridged)//' | xargs`
ARTIST=`grep -a -m1 -h -r "artist" tmp.txt | head -1 | cut -d: -f2- | xargs` ARTIST=`grep -a -m1 -h -r "artist" tmp.txt | head -1 | cut -d: -f2- | xargs`
GENRE=`grep -a -m1 -h -r "genre" tmp.txt | head -1 | cut -d: -f2- | xargs` GENRE=`grep -a -m1 -h -r "genre" tmp.txt | head -1 | cut -d: -f2- | xargs`
BITRATE=`grep -a -m1 -h -r "bitrate" tmp.txt | head -1 | rev | cut -d: -f 1 | rev | egrep -o [0-9]+ | xargs` BITRATE=`grep -a -m1 -h -r "bitrate" tmp.txt | head -1 | rev | cut -d: -f 1 | rev | egrep -o [0-9]+ | xargs`