Gentoo Archives: gentoo-user

From: walt <w41ter@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: [OT] shell ouput which file descriptor
Date: Fri, 09 Apr 2010 22:01:35
Message-Id: hpo80p$qo1$1@dough.gmane.org
In Reply to: [gentoo-user] [OT] shell ouput which file descriptor by Harry Putnam
1 On 04/09/2010 08:19 AM, Harry Putnam wrote:
2 > This is not a question about cvs... its only used for example.
3 >
4 > I'm puzzled about a change in what I see when I run
5 > cvs -n update 2> /dev/null
6 >
7 > I've apparently lost the ability to remove stder from output.
8 >
9 > I used that command to trim out file descriptor 2 which used to leave
10 > a list of any changed files in the repo on the console, for a very
11 > long time.
12 >
13 >
14 > Suddenly there is no difference with:
15 >
16 > cvs -n update 2> /dev/null
17 > cvs -n update
18 >
19 > The stuff on stderr still shows in the ouput either way.
20 >
21 > Further;
22 > cvs -n update 2>er (redirect stder to ./er)
23 >
24 > Doesn't put anything in ./er
25 >
26 > However cvs -n update 1>out (redirect stdout to ./out)
27 >
28 > Does catch the output I'm after and leave out stderr. (as one would
29 > expect)
30 >
31 > So, again, apparently I've lost the ability to trim out stderr with a
32 > redirect to /dev/null (cvs -n update 2> /dev/null)
33 >
34 > ------- --------- ---=--- --------- --------
35 >
36 > The only thing I've been tinkering with is evaluating the
37 > /etc/DIR_COLORS file. I switched from evaluating a custom version to
38 > evaluating the default version.
39
40 I have no helpful advice, but I would try a couple of simple experiments:
41
42 I have this in my home directory because I'm color blind:
43 -rw-r--r-- 1 wa1ter users 0 2007-08-27 18:29 .dir_colors
44
45 $cat nonexistantfile
46 cat: nonexistantfile: No such file or directory
47
48 $cat nonexistantfile 2> /tmp/testfile
49 $
50
51 $cat /tmp/testfile
52 cat: nonexistantfile: No such file or directory
53
54 Are you running cvs as root, or user, or ...?

Replies

Subject Author
[gentoo-user] Re: [OT] shell ouput which file descriptor Harry Putnam <reader@×××××××.com>