Ant*_*hon 15
您可以使用grep:
grep -E '^.{639}$' your.txt
Run Code Online (Sandbox Code Playgroud)
在^与$比赛开始和行结束。在.{639}比赛的任何字符正好639倍。
正如 Stéphane 所评论的,这可以缩短(一个字符)为:
grep -Ex '.{639}' your.txt
Run Code Online (Sandbox Code Playgroud)
并-x表示:Select only those matches that exactly match the whole line
JJo*_*oao 12
使用 awk:
awk 'length == 639'
Run Code Online (Sandbox Code Playgroud)
或更容易理解:
awk 'length() == 639'
Run Code Online (Sandbox Code Playgroud)
\谢谢{@fedorqui}