[英]Append find result to txt file
I am trying to concat jpg
and png
images with the use of ffmpeg. 我正在尝试使用ffmpeg连接
jpg
和png
图像。 Before doing so, I am trying to append the file name and paths to a txt file. 在这样做之前,我试图将文件名和路径附加到txt文件中。 However, I am getting an error.
但是,我得到一个错误。 The files have to follow the format
file '/media/test.jpg'
for appending to the txt file. 这些文件必须遵循格式
file '/media/test.jpg'
才能附加到txt文件。 What would be the best way to achieve this? 实现这一目标的最佳方法是什么?
Print files: 打印文件:
find . \( -name '*.jpg' -o -name '*.png' \) -print
Error when trying this: 尝试此错误:
find . \( -name '*.jpg' -o -name '*.png' \) printf "file '%s'\n" > mylist.txt
find . \( -name '*.jpg' -o -name '*.png' \) -printf "file '%p'\n" >> mylist.txt
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.