From owner-freebsd-questions Wed Oct 18 3:48:33 2000 Delivered-To: freebsd-questions@freebsd.org Received: from gray.westgate.gr (gray.westgate.gr [212.205.119.66]) by hub.freebsd.org (Postfix) with ESMTP id 6F6A137B479 for ; Wed, 18 Oct 2000 03:48:29 -0700 (PDT) Received: (from charon@localhost) by gray.westgate.gr (8.11.1/8.11.1) id e9IAmDG00501; Wed, 18 Oct 2000 13:48:13 +0300 (EEST) Date: Wed, 18 Oct 2000 13:48:13 +0300 From: Giorgos Keramidas To: Roger Merritt Cc: freebsd-questions@FreeBSD.ORG Subject: Re: I/O redirection in tcsh Message-ID: <20001018134813.C302@gray.westgate.gr> References: <3.0.6.32.20001018164207.007c6850@stjohn.stjohn.ac.th> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3.0.6.32.20001018164207.007c6850@stjohn.stjohn.ac.th>; from mcrogerm@stjohn.ac.th on Wed, Oct 18, 2000 at 04:42:07PM +0700 X-PGP-Fingerprint: 3A 75 52 EB F1 58 56 0D - C5 B8 21 B6 1B 5E 4A C2 X-URL: http://students.ceid.upatras.gr/~keramida/index.html Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, Oct 18, 2000 at 04:42:07PM +0700, Roger Merritt wrote: > I can't figure out from the man page how to redirect STDERR to STDIN so > error messages will be logged while I'm running a job in the background. In > bash I could just add '2>&1' in the command line, but tcsh calls that > 'ambiguous redirection' and refuses to run the command. I tried just '>&', > but that didn't work, either. What's the proper command? tcsh (and csh, for that matter) is known for it's lack of file-descriptor manipulation in the prompt. You can do limited stuff like: % ./program >& program.stderr.log & which will redirect only stderr of ./program in program.stderr.log, but I don't know of a way to redirect file descriptor 2 to where 1 points at that point. I tend to use too many times the following trick: % /bin/sh -c './program 2>&1 > error.log &' Ciao, Giorgos. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message