Skip to content

Instantly share code, notes, and snippets.

@rileyjshaw
Last active July 27, 2022 14:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rileyjshaw/a2b4c24c35e274433c19128c069e28e4 to your computer and use it in GitHub Desktop.
Save rileyjshaw/a2b4c24c35e274433c19128c069e28e4 to your computer and use it in GitHub Desktop.
Adds ID3v1 and ID3v2 track information to a folder of mp3s, based on the output order of `ls`.
#!/bin/bash
FILES=(*.mp3)
for i in "${!FILES[@]}"; do
id3v2 -T "$((i + 1))/${#FILES[@]}" "${FILES[i]}"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment