Advertisement
Guest User

Untitled

a guest
Jul 26th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. times=()
  2. for f in *.mp3; do
  3. _t=$(ffmpeg -i "$f" 2>&1 | grep "Duration" | grep -o " [0-9:.]*, " | head -n1 | tr ',' ' ' | awk -F: '{ print ($1 * 3600) + ($2 * 60) + $3 }')
  4. times+=("$_t")
  5. done
  6. echo "${times[@]}" | sed 's/ /+/g' | bc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement