New line or comma after each output of 'mediainfo'

58 Views Asked by At
for i in /Volumes/foo ; do
    mediainfo --Inform="Video;%Duration%" "$i"
done

give me all the durations of my files but with no breaks in between -

4676221980459407897433746716462229751859243227502018220682242345299753936250492322632942789245478482465538633206855270531228340971751535113109774564023053153476602219878094550607654775812072022073715202529932267031053537331946025712135025373

how do I get something like

46762,221980,45940,

or, alternatively, an new line after each output?

1

There are 1 best solutions below

0
Gilles Quénot On BEST ANSWER

Directly with the command:

$ mediainfo --Inform="Video;%Duration%," *.mkv 
3248040.000000,3185520.000000,3027840.000000,

$ mediainfo --Inform="Video;%Duration%" *.mkv 
3248040.000000
3185520.000000
3027840.000000