1

我有这个 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> log1> log- 没有任何效果。

4

2 回答 2

1
mkvmerge -o "$OUTDIR/$filename" "$filename" "${filename%.mkv}.mka" "${filename%.mkv}.ass"|(sed -n /^The/q;cat)
于 2013-11-12T08:30:26.407 回答
0

mkvmerge 有一个安静模式,试试看:

$ mkvmerge -q

于 2013-03-04T09:40:21.840 回答