私はテストファイルを持っています:
0000 850 1300 Pump 4112 893 2400 Installing sleeve 5910 890 2202 Installing tool
Testing crankcase and Protecting oil seal Installing crankshaft
carburetor for leaks (starter side) 5910 890 2208 Installing tool, 8
0000 855 8106 Sealing plate 4112 893 2401 Press sleeve Installing hookless
Sealing exhaust port Installing oil seal snap rings in piston
0000 855 9200 Nipple (clutch side) 5910 890 2301 Screwdriver, T20
Testing carburetor for 4118 890 6400 Setting gauge Separating handle
leaks Setting air gap moldings
0000 890 1701 Testing tool kit between ignition 5910 890 2400 Screwdriver, T27x150
0000 893 2600 Clamping strap module and flywheel For all IS screw
印刷したいのは:
0000 850 1300
4112 893 2400
5910 890 2202
5910 890 2208
0000 855 8106
.
.
.
ご協力ありがとうございました。
編集:
ファイル内の番号は別の場所にあります。番号は入力ファイルにランダムに配置されます。各番号の形式は次のとおりです。
xxxx xxx xxxx
編集-1:
2つの方法を試しましたが、mawkでは機能しません。
pic@pic:~/Pulpit$ mawk --traditional -f script.awk infile
mawk: not an option: --traditional
pic@pic:~/Pulpit$ mawk -f script.awk infile
pic@pic:~/Pulpit$