Bizarre redirection failure
John Chambers
jc at trillian.mit.edu
Tue Apr 30 11:44:13 EDT 2002
I've been noticing this curious problem for some time, and
thought that someone on this list might have. Consider the
two commands from my tcsh history file:
317 11:20 make test > & test.log &
337 11:22 make test > & test_log &
The first of these produces no output at all. The test.log
file doesn't appear (in any directory apparently). However,
the command does run, and the results of the make are
created. The only problem is that "test.log" seems to be
replaced with "/dev/null".
The second command works like I'd expect. The test_log file
appears and contains all the stdout and stderr text from
the make.
The only difference between the two commands really is the
'.' versus the '_' in the output file name. Running the
commands in the foreground doesn't affect the results; it
just means I have to use a different xterm to see what's
happening.
I've tried this on several flavors of linux, and the same
failure seems to happen everywhere. I also have some
accounts on FreeBSD systems, where I also use tcsh, and
both commands work like I'd expect there. It doesn't seem
likely that linux could subvert tcsh's syntax or file
handling, but that does seem to be what's going on.
As far as I can tell, there's nothing special about '.' in
the rest of tcsh, and other file names with dots work just
fine, like you'd expect.
More information about the Discuss
mailing list