LinuxShell 從文字檔找出某字串 - LinuxHedy · 2010-08-26Table of ContentsPostCommentsRelated Posts 請教各位, 利用 shell 從檔案 file 將字串 "asdf" 所屬的那行輸出至 file2 的語法為 sed -n "/asdf/w file2" file 如果現在我要將字串 "asdf" 或 "ffff" 所屬的那行輸出至 file2 的語法應該如何修改 謝謝 -- LinuxAll CommentsGilbert2010-08-27用xargs 試試看Ursula2010-08-31能用grep去做嗎?Queena2010-09-05sed -n "/["asdf""ffff"]/w file2" file ??Rachel2010-09-07謝謝各位, 我最後是用 grep 做Hamiltion2010-09-09sed -nre'/(asdf|ffff)/w file2' fileRelated Poststerminal mode切換新手ubuntu開機上網抓取webcamUbuntu10.4 筆電外接螢幕問題lazyscripts 0.2無法顯示套件清單
All Comments