PERL - need help on syntax
by GPGAgent from LinuxQuestions.org on (#6F6T4)
Hi folks,
I'm using this bit of perl to generate input for ffmpeg concat
Code:ls OUT*.ts | perl -ne 'print "file $_"'which is good and produces this
Code:file OUT-file2.ts
file OUT-file4.ts
file OUT-file5.ts
file OUT-file6.ts
file OUT-file7 8.ts
file OUT-file8 9.tsbut the last two files have spaces so I need to wrap it in double quotes.
This does the leading quote, but I'm stumped to see how to put in a closing quoteCode:ls OUT*.ts | perl -ne 'print "\"file $_"'
file "OUT-file2.ts
file "OUT-file4.ts
file "OUT-file5.ts
file "OUT-file6.ts
file "OUT-file7 8.ts
file "OUT-file8 9.tsAlternatively I could rremove the spaces from the filename, but again I find this part of bash scripting so difficult
I'm using this bit of perl to generate input for ffmpeg concat
Code:ls OUT*.ts | perl -ne 'print "file $_"'which is good and produces this
Code:file OUT-file2.ts
file OUT-file4.ts
file OUT-file5.ts
file OUT-file6.ts
file OUT-file7 8.ts
file OUT-file8 9.tsbut the last two files have spaces so I need to wrap it in double quotes.
This does the leading quote, but I'm stumped to see how to put in a closing quoteCode:ls OUT*.ts | perl -ne 'print "\"file $_"'
file "OUT-file2.ts
file "OUT-file4.ts
file "OUT-file5.ts
file "OUT-file6.ts
file "OUT-file7 8.ts
file "OUT-file8 9.tsAlternatively I could rremove the spaces from the filename, but again I find this part of bash scripting so difficult