cppcheck の出力で awk を使用したいのですが、この 1 つのライナーの最後に cppcheck が awk に出力されないようです。cppcheck の出力を awk へのパイプにのみ入れるようにする方法はありますか?
git status -s | awk '(($1 ~ /M/) || ($1 ~ /A/)) { print $2 }' | xargs cppcheck -j 2 --enable=warning,performance | awk '/error/ { print $1 }'
そして、ここに私の出力があります
[silly.cpp:9]: (warning) %d in format string (no. 1) requires 'int' but the argument type is 'char *'.
[silly.cpp:7]: (error) Buffer is accessed out of bounds: buf