Linux scripting duration with minutes and seconds

ساخت وبلاگ

آخرین مطالب

امکانات وب

Vote count: 0

I need to write a SHELL or PYTHON script that takes 2 parameters from the command line and saves them in a text file in a specific format : the first one is the name of a song (that should be ENCLOSED IN quotes in case it contains several words) and the second parameter is the duration in seconds (a single numeric value). The idea of the script is to take a title of a song and its duration and save the name of the song between quotes and format its duration in minutes:seconds. This information should be appended to a text file, example : "With or without you" - 4:07.

Would appreciate the help

Executing the command for example: ./ "Empire state of mind" 247

asked 48 secs ago

نویسنده : استخدام کار بازدید : 29 تاريخ : سه شنبه 4 ارديبهشت 1397 ساعت: 5:28

تبلیغات در اینترنت