Linux請問Vim要如何儲存搜尋結果? - LinuxRosalind · 2019-01-19Table of ContentsPostCommentsRelated Posts如題。 在Vim內要如何把搜尋到的結果字串另外存到一個 new file 呢? 問了G大神還是沒問到... -- LinuxAll CommentsCara2019-01-21https://is.gd/BvWhQD 這個不能用?Donna2019-01-24我照著用 :g/regex/ .w >> res.txt 出現E212: Can't open file for writingZora2019-01-28https://imgur.com/mVKleYLDonna2019-01-29w後面加"!"已可寫出res.txt, 但寫出的是整行,有辦Tom2019-01-31法可以只寫出所搜尋到的字串就好嗎?Bethany2019-02-01不考慮直接用 grep -o regex > output.txt 嗎Robert2019-02-02grep是辦得到,只是我想說在vi裡面看檔案時直接輸出Candice2019-02-04你是說mem前面的都不要?那不就改一下regex就好?Sandy2019-02-08對 我只要訊號名稱,但卻會寫出整行, regex已經鎖住訊號名稱了Quintina2019-02-13Bencrie,你的方法可以輸出我想要的,只是就是要在另Steve2019-02-15一個terminal grep出來...Isla2019-02-19在新buffer然後用0read ! 配合外部命令再存會不會較省事?Delia2019-02-19有 editor 板Gary2019-02-22sorry不知有editor版,謝謝Mary2019-02-26:w !grep -o regex > outputPuput2019-02-27哇 頭一次知道有editor板...Related Posts如何設定同時連內網(eth)跟外網(wifi)git branch 的問題請問如何將 Nautilus 內的文件檔名加入換行使用UNIX--Like來開發的作業系統autofs沒辦法掛載
All Comments