grep a string which contains whitespaces

suppose we want to find string "ret is" in the current dir and all sub-dirs, the grep command could like this

1) put the whitespace between two single quotes:  

grep -R ret' 'is *

2) replace a whitespace character with a slash+whitespace:

grep -R ret\ is *

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章