Skip to content

Instantly share code, notes, and snippets.

@davidmintz
Created October 23, 2017 02:53
Show Gist options
  • Save davidmintz/0810592259ed45f93c885e4fc13ed0cd to your computer and use it in GitHub Desktop.
Save davidmintz/0810592259ed45f93c885e4fc13ed0cd to your computer and use it in GitHub Desktop.
draft bash script for making Android play old mp3 in track order
#!/bin/bash
DIR=$1
cd $DIR
counter=1;
echo hello fucking $counter
PLAYLIST=playlist.m3u
while read FILENAME; do
# NUMBER=$(printf '%02d' $counter)
id3tag --track=$counter "$FILENAME"
# echo "renaming \"$FILENAME\" -> \"$NUMBER $FILENAME\"..."
# mv "$FILENAME" "$NUMBER - $FILENAME"
counter=$((counter + 1))
done < "$PLAYLIST"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment