我有这个 bash 命令:
find $DIR -type f -maxdepth 1 -name '*.mkv' | {
while read filename ; do
mkvmerge -o "${OUTDIR}/${filename}" "${filename}" "${filename%.mkv}.mka" "${filename%.mkv}.ass"
done
}
这给了我以下输出:
mkvmerge v5.8.0 ('No Sleep / Pillow') built on Mar 3 2013 21:06:19
'./file.mkv': Using the demultiplexer for the format 'Matroska'.
'./file.mka': Using the demultiplexer for the format 'Matroska'.
'./file.ass': Using the demultiplexer for the format 'SSA/ASS subtitles'.
'./file.mkv' track 0: Using the output module for the format 'AVC/h.264'.
'./file.mkv' track 1: Using the output module for the format 'FLAC'.
'./file.mka' track 0: Using the output module for the format 'AC3'.
'./file.ass' track 0: Using the output module for the format 'text subtitles'.
The file './out//./file.mkv' has been opened for writing.
Progress: 9%
只有进度线刷新。我想在“进度”行之前摆脱那些行。首先我想我可以在最后添加这个:| grep "Progress"
但它不起作用。是否有任何解决方案来格式化正在运行的程序的输出?我知道bar
实用程序可以以几乎相同的方式生成漂亮的进度条:
我试过2> log
了1> log
- 没有任何效果。