Skip to content

Instantly share code, notes, and snippets.

@kencoba
Last active June 15, 2017 01:34
Show Gist options
  • Save kencoba/4c9ab62361dd51066d376379f08bf9aa to your computer and use it in GitHub Desktop.
Save kencoba/4c9ab62361dd51066d376379f08bf9aa to your computer and use it in GitHub Desktop.
List up chapter markers.
#!/usr/bin/env zsh
for difffile in *.txt
do
hms=`sort -n $difffile | awk 'BEGIN{threshold = 1000} $1 < threshold {print $2}' | sort -n | head -n 1 | ruby sec_to_hms.rb`
if [[ $hms == "00:00:00" ]] then
hms=`sort -n $difffile | awk '{print $2}' | head -n 1 | ruby sec_to_hms.rb`
fi
echo "$hms ${difffile}"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment