]> Sergey Matveev's repositories - dotfiles.git/blobdiff - bin/bin/cueparser
Less .sh and more explicit my-
[dotfiles.git] / bin / bin / cueparser
diff --git a/bin/bin/cueparser b/bin/bin/cueparser
new file mode 100755 (executable)
index 0000000..2e61004
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+c=1
+iconv -f ${2:-cp1251} -t utf-8 "$1" |
+sed -n 's/^  *TITLE .\(.*\)".*$/\1/p' | while read trackname; do
+       v=`printf "%02d\n" $c`
+       echo mv split-track$v.wav $v.\"$trackname\".wav
+       c=$(( $c + 1 ))
+done