Skip to content

Instantly share code, notes, and snippets.

@beci
Last active May 29, 2018 20:32
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 beci/a9394984444f11f379dd25b11d733599 to your computer and use it in GitHub Desktop.
Save beci/a9394984444f11f379dd25b11d733599 to your computer and use it in GitHub Desktop.
Fish commands to extract track (flac files) from multiple mka file
# List all tracks from all mka files in Downloads
for fname in (find ~/Downloads -type f -name '*.mka'); mkvmerge -i $fname| grep 'Track ID'; end
# Extract second (number 1) track from all mka files in Downloads
for fname in (find ~/Downloads -type f -name '*.mka'); mkvextract $fname tracks 1:(basename (dirname $fname)).flac; end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment