开发者

Searching for right double angle quotes on freebsd7 unix

I know how to search for a string in files using grep

grep -Flr --include "*" 'string' files/

However how would I search for right double angle quotes ( » 开发者_Go百科) as the character will not appear in the terminal.


The double angle quotes are ASCII codes 174 (<<) and 175 (>>), if you are talking about ANSI character set and not Unicode.

You can try

grep `echo "\256"` file 

256 is the octal ASCII value for <<. Note that octal value is enclosed in backquotes.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜