Red*_*ick 17
$ perl -ne 'print "$. $_" if m/[\x80-\xFF]/' utf8.txt
2 Pour être ou ne pas être
4 By? ?i neby?
5 ???
Run Code Online (Sandbox Code Playgroud)
或者
$ grep -n -P '[\x80-\xFF]' utf8.txt
2:Pour être ou ne pas être
4:By? ?i neby?
5:???
Run Code Online (Sandbox Code Playgroud)
utf8.txt 在哪里
$ cat utf8.txt
To be or not to be.
Pour être ou ne pas être
Om of niet zijn
By? ?i neby?
???
Run Code Online (Sandbox Code Playgroud)