由买买提看人间百态

topics

全部话题 - 话题: a423
(共0页)
s*****i
发帖数: 650
1
来自主题: Unix版 - regular expression question
source file input.txt:
386 2048 D403 MG0011 100
486 4096 D404 MG0012 270
386 8192 A423 CC0177 400
486 8192 A424 CC0182 670
286 4096 A423 CC0183 100
286 4096 A425 CC0184 80
68020 2048 B406 EE1029 80
68030 2048 B410 EE1030 100
"trs80" 64 Z101 EL0020 0
If I use the following command:
$> awk '$1 ~ /[^23468]/ {print $0}' input.txt
The output is:
XT 640 D402 MG0010 0
Mac 4096 B407 EE1027 80
Apple 4096 B406 EE1028 40
68020 2048 B406 EE1029 80
68030 2048 B410 EE1030 100
$unix
s*****i
发帖数: 650
2
来自主题: Unix版 - regular expression question
I am sorry for there is sth wrong with the pasting.
the input file should be like below:
XT 640 D402 MG0010 0
386 2048 D403 MG0011 100
486 4096 D404 MG0012 270
386 8192 A423 CC0177 400
486 8192 A424 CC0182 670
286 4096 A423 CC0183 100
286 4096 A425 CC0184
(共0页)