[plug] Shell query...

Peter Wright pete at cygnus.uwa.edu.au
Thu Jun 8 12:04:09 WST 2000


Hi all,

Small shell-related query....

You know everyone's favourite spam storage and retrieval unit,
/dev/null? Well, I was just wondering if there is a simple way to
simulate the effect of /dev/null on a non-Linux system.

Specifically, I'm developing using Cygwin and zsh on an NT system
(pity me :), and I need to do a lot of cvs updating on a moderately
large project (if you don't know what cvs is, it doesn't really matter
for now, but you should find out :). Now I'm not sure if the cvs on a
unix platform does the same, but it appears that cvs on NT (it's the
WinCVS command-line util, btw) has a habit of listing _every_
directory it updates on the standard error, rather than standard
input.

Which is moderately annoying, because it means I can't just grep -v
the directory messages out (which is what I want to do). If I was on a
Linux system, I'd just do something like

$ cvs update -P -d 2> /dev/null | [...whatever other grepping here...]

which (unless I've made a mistake), should redirect the STDERR to
/dev/null and leave STDOUT alone.

On the NT system, I can of course do 

$ cvs update -P -d 2> somefilename 

but that would be annoying as I'd have to keep removing said file
everytime I did an update. Well, I could wrap it in a script, but
that'd be a little inflexible...

Does anyone have any other clever shell suggestions as to how I could
just make STDERR just "go away"? I feel it should be straightforward,
but my knowledge of shell tricks is coming up a little short....

Thanks,
Pete.
-- 
http://cygnus.uwa.edu.au/~pete/

--
hundred-and-one symptoms of being an internet addict:
62. If your doorbell rings, you think that new mail has arrived.  And then
    you're disappointed that it's only someone at the door.




More information about the plug mailing list