Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
commands | grep -f - fileファイルからパイプされたコンテンツを抽出するために使用します。 ただし、一致する文字列が行頭にある場合にのみ抽出したいと考えています。通常は を使用grep '^string'しますが、 では機能しませんgrep -f。
commands | grep -f - file
grep '^string'
grep -f
grep -f '^-' file grep: ^-: No such file or directory
grep -f -と をgrep '^'一緒 に使用するにはどうすればよいですか?
grep -f -
grep '^'