Skip to content

Instantly share code, notes, and snippets.

@lighterowl
Created January 25, 2014 21:23
Show Gist options
  • Save lighterowl/8623812 to your computer and use it in GitHub Desktop.
Save lighterowl/8623812 to your computer and use it in GitHub Desktop.
an awk script for parsing the output of ffprobe and generating a tracklisting
#!/bin/awk -f
/TITLE/ {
FS=": ";
$0=$0;
Title=$2;
}
/Duration/ {
FS=" ";
$0=$0;
Duration=substr($2,4,5);
}
/track/ {
FS=": ";
$0=$0;
Track=$2;
}
END {
printf("%s - %s [%s]\n", Track, Title, Duration);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment