試圖找出如何編寫跨多行命令,因爲真正的方法是提示(4200個字符),所以我試過這個例子:多行grep命令(不是多行grep)
提出,包含以下三個線測試文件:
some thing
some
thing
當我這樣做的grep:grep "some thing" test
我得到的預期結果:some thing
但是,當我做到這一點的grep:grep "some \
thing" test
我得到的意想不到的結果:
some thing
thing
就好像它兩次運行grep一次爲「一些」和一次爲「事物」。有沒有什麼方法可以正確使用\
將2結合到第一個grep的結果?
只需重新閱讀這個...什麼_exactly_是你的預期輸出? – Steve
@steve我希望和單行相同(所以第一個例子,只有'some thing'返回)。 – Hershizer33