[SOLVED] ls -1 avi*.avi | sed s/"P"/" file P"/g > mylist.txt
by gilesaj001 from LinuxQuestions.org on (#5CDKX)
I have a folder that has a number of files in the format of:
Code:avi-1.avi
avi-2.avi
etc
etc
avi-31.avi
I need to make a file to be used with ffmpeg concat that is formated like this:
Code:file avi-1.avi
file avi-2.avi
etc
etc
etc
file avi-31.aviI have this command that creates the file with the avi file names in it but it does not insert file<space> in front of the avi names.
PHP Code:ls -1 avi*.avi | sed s/"P"/" file P"/g > mylist.txt
the output of this is
Quote:
I have played around with it for a long time and I am not a programmer so any help would be appresiated.


Code:avi-1.avi
avi-2.avi
etc
etc
avi-31.avi
I need to make a file to be used with ffmpeg concat that is formated like this:
Code:file avi-1.avi
file avi-2.avi
etc
etc
etc
file avi-31.aviI have this command that creates the file with the avi file names in it but it does not insert file<space> in front of the avi names.
PHP Code:ls -1 avi*.avi | sed s/"P"/" file P"/g > mylist.txt
the output of this is
Quote:
avi-2.avi etc etc avi-31.avi |