我有一个测试文件:
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:
我尝试了两种方法,但它不适用于 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$