Parse m3u playlist file for total time

awk -F":|," '{RS="#"; sec+=$2}END{h=(sec/3600);m=((sec/60) % 60);s=(s;printf("%02d:%02d:%02d\n", h, m, s)}' file.m3u
Parse an m3u file with seconds for each item and output the length of the entire playlist
Sample Output
03:13:37

0
By: jonavon
2020-05-16 18:55:32

What Others Think

thanks for an amazing article onmovies app
moksha456 · 11 weeks and 5 days ago
https://www.apkspree.com/showbox-apk/ https://www.apkspree.com/tea-tv-apk/ https://www.apkspree.com/savefrom-net-apk-download/ https://www.apkspree.com/hotstar-apk-download/
chepkobeer · 11 weeks and 1 day ago
Well, I love making playlist especially when I was young. You love to focus on the songs that you want to hear more often, sand I see nothing is wrong with that. Based on what i read from http://www.bestwritingservicecanada.com/">http://www.bestwritingservicecanada.com/, it is a good habit to make your own playlist.
janedeleon · 10 weeks and 4 days ago
Well, I love making playlist especially when I was young. You love to focus on the songs that you want to hear more often, sand I see nothing is wrong with that. Based on what i read from http://www.bestwritingservicecanada.com">bestessay , it is a good habit to make your own playlist.
janedeleon · 10 weeks and 4 days ago
Try [url= http://empirepokerschool.com/]poker training[/url] ! here you will learn not only the right, but the secrets of the masters, betting strategies, table etiquette! I promise you, you won’t regret it!
Foraes · 9 weeks and 1 day ago
Your post is very meticulous and impressive for me, I hope to get more good posts. atari breakout
pikachu88 · 8 weeks and 5 days ago
your post is really interesting A few days ago I also find m3u total file for my friend and also want to know deeply about the m3u file It is very helpful for who those working in this file and many people also want to learn how to use this type of file and many Professional logo designer in Pakistan after the job also involved in this crowd who learn this type of skills.
Hania · 7 weeks ago
your post is really interesting A few days ago I also find m3u total file for my friend and also want to know deeply about the m3u file It is very helpful for who those working in this file and many people also want to learn how to use this type of file and many Professional logo designer in Pakistan after the job also involved in this crowd who learn this type of skills.
Hania · 7 weeks ago
Your post is very interesting I also find m3u full file and also know about m3u file You adore to attention on the songs that you need to listen extra frequently, and I see not anything is wrong with that. Primarily based on what you read from my profession is business Logo Design Services and after my job, my first choice learn this type of skills
frankiey · 4 weeks and 3 days ago
Movie reviews - Movie Laundry provides info on movies, movie reviews, ratings, cast and crew details of movies. Get updated movie reviews from movie Laundry.checkout their works at- https://www.movielaundry.in
movielaundry · 3 weeks ago
Movie reviews - Movie Laundry provides info on movies, movie reviews, ratings, cast and crew details of movies. Get updated movie reviews from movie Laundry.checkout their works- https://www.movielaundry.in movielaundry
movielaundry · 3 weeks ago
Web Design Fresno group has top proficient qualified from trustworthy foundations with hands-on involvement with Website Designing, web advancement, realistic structuring, e-promoting, space facilitating, web-based business arrangement, content composition, site upkeep, web advertising, and E-pamphlets.
lisacshearin77 · 2 weeks and 5 days ago
Nice
maryclark101 · 2 weeks and 3 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: