试图从cvs命令grep cygwin输出

时间:2022-05-29 14:06:29

I am trying to find an easy way to see what files I have modified in my checked out code by running either cvs update or cvs status and limiting the output to the files I have modified.

我试图通过运行cvs update或cvs status并将输出限制为我修改过的文件,找到一种简单的方法来查看我在已检出代码中修改了哪些文件。

I started by doing variations on:

我开始做变种:

cvs update | grep "M " // this did nothing useful.
cvs update | grep -e "M " * // this got me all the files that had "M " in them.

in order to only get the lines that have the M for modified. That did not work.

为了只获得具有修改的M的行。那没用。

Someone suggested:

cvs status -v | grep Locally // -v prints the verbose status to ouput

and that also did not have the expected results. Is grep the correct tool to be using here?

而这也没有预期的结果。 grep是在这里使用的正确工具吗?

Thanks!

1 个解决方案

#1


Try cvs update 2>&1 | ... IIRC, the log output of cvs is to stderr, not stdout, so the pipe doesn't catch that by default.

尝试cvs update 2>&1 | ... IIRC,cvs的日志输出是stderr,而不是stdout,所以默认情况下管道没有捕获到它。

#1


Try cvs update 2>&1 | ... IIRC, the log output of cvs is to stderr, not stdout, so the pipe doesn't catch that by default.

尝试cvs update 2>&1 | ... IIRC,cvs的日志输出是stderr,而不是stdout,所以默认情况下管道没有捕获到它。