私はn番目のマッチした行をすべて印刷する方法を知っていますが、awkはマッチしたすべてのn番目のマッチした行とすべての行をマスではない
入力例:
Something else 1
Downloading: file1 1%
Downloading: file1 10%
Something else 2
Downloading: file1 30%
Something else 3
Downloading: file1 40%
Downloading: file2 50%
Downloading: file1 60%
Downloading: file1 100%
Downloading: file2 100%
Something else 4
パターンは '^ダウンロード:' の場合:perlのファンのために
Something else 1
Downloading: file1 10%
Something else 2
Something else 3
Downloading: file1 40%
Downloading: file1 60%
Downloading: file2 100%
Something else 4
入力フラグメントと予想される出力を表示します。 – RomanPerekhrest