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.
一部のコマンドの一部の行が「修復不可能」であることがわかりました。git リポジトリがある場合の良い例:
git ls-remote | grep inexistent-match
とにかく、最初の1行「From git@github.com:[...]」(またはそれに似たもの)を返します。
何の話か分からないので、既出スレがあったらごめんなさい。
これらの最初の出力を grep/sed するにはどうすればよいですか?
君たちありがとう!
stdout一部のデータが移動する場合にのみgrepしていますstderr
stdout
stderr
試すgit ls-remote 2>&1 | grep inexistent-match
git ls-remote 2>&1 | grep inexistent-match
に2>&1リダイレクトさstderrれますstdout
2>&1