From owner-freebsd-questions Wed Oct 18 8:46:51 2000 Delivered-To: freebsd-questions@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id B504137B4C5 for ; Wed, 18 Oct 2000 08:46:48 -0700 (PDT) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id e9IFkZn10970; Wed, 18 Oct 2000 08:46:35 -0700 (PDT) Date: Wed, 18 Oct 2000 08:46:35 -0700 From: Alfred Perlstein To: Giorgos Keramidas Cc: Roger Merritt , freebsd-questions@FreeBSD.ORG Subject: Re: I/O redirection in tcsh Message-ID: <20001018084634.J272@fw.wintelcom.net> References: <3.0.6.32.20001018164207.007c6850@stjohn.stjohn.ac.th> <20001018134813.C302@gray.westgate.gr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.4i In-Reply-To: <20001018134813.C302@gray.westgate.gr>; from keramida@ceid.upatras.gr on Wed, Oct 18, 2000 at 01:48:13PM +0300 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * Giorgos Keramidas [001018 03:48] wrote: > 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 &' Try this: (myprog >& /dev/stdout) > outfile -Alfred To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message