作者热门文章
- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我在这里发现了一些类似的问题,但它们并不完全相同。
我想对某些文件中的文本 'true' 格式
进行 grep。
我该怎么做?
不确定如何转义 true
周围的单引号。
最佳答案
只需将字符串括在双引号内:
grep "'true' format" your_file
$ cat a
this is 'true' format
and this is true formatting
test
$ grep "'true' format" a
this is 'true' format
关于linux - 如何在grep中转义单引号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23788000/
我是一名优秀的程序员,十分优秀!