문제

I'm trying to see what files are modified locally in my cvs repository. I tried this

cvs update -qn | grep "^M "

It sorta does what I expect it to in that it shows a bunch of

M sources/..../a.cpp
M sources/.../b.cpp

but the output also contains a bunch of

cvs update: source/.../somefile.h is no longer in the repository

Why does this above line make it to the grep output. I assumed "^M " would force grep to only match lines starting with "M "

도움이 되었습니까?

해결책

its almost certainly output from the stderr stream from cvs. try

 cvs update -qn 2>&1 | grep "^M "

Personally, I hate throwing away error messages, I would capture that info to a file

 cvs update -qn 2>./filesMissingRpt.txt | grep "^M "

I can't test it, but very confident this will solve your problem.

IHTH.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top