From owner-freebsd-questions@FreeBSD.ORG Thu Sep 11 08:41:24 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A3F4106567A for ; Thu, 11 Sep 2008 08:41:24 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (agora.rdrop.com [199.26.172.34]) by mx1.freebsd.org (Postfix) with ESMTP id 2476A8FC28 for ; Thu, 11 Sep 2008 08:41:23 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (66@localhost [127.0.0.1]) by agora.rdrop.com (8.13.1/8.12.7) with ESMTP id m8B8fLGt001364 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 11 Sep 2008 01:41:22 -0700 (PDT) (envelope-from perryh@pluto.rain.com) Received: (from uucp@localhost) by agora.rdrop.com (8.13.1/8.12.9/Submit) with UUCP id m8B8fLA6001363; Thu, 11 Sep 2008 01:41:21 -0700 (PDT) Received: from fbsd61 by pluto.rain.com (4.1/SMI-4.1-pluto-M2060407) id AA11090; Thu, 11 Sep 08 01:23:46 PDT Date: Thu, 11 Sep 2008 01:25:42 -0700 From: perryh@pluto.rain.com To: jhall@vandaliamo.net Message-Id: <48c8d606.hss+AMFX14shlIQG%perryh@pluto.rain.com> References: <53798.66.84.183.146.1221048972.squirrel@admintool.trueband.net> <20080910211651.Q48125@wojtek.tensor.gdynia.pl> <50349.66.84.183.146.1221097271.squirrel@admintool.trueband.net> In-Reply-To: <50349.66.84.183.146.1221097271.squirrel@admintool.trueband.net> User-Agent: nail 11.25 7/29/05 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: wojtek@wojtek.tensor.gdynia.pl, freebsd-questions@freebsd.org Subject: Re: Capturing tar output X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Sep 2008 08:41:24 -0000 > > redirect stderr with "2>" operator > > > Using the following command, > # /usr/local/gtar/bin/tar -cvf - /home/hallja 2 > /var/log/test.txt | > /usr/local/bin/gpg --encrypt "recipient" | dd of=/dev/nsa0 obs=128k > > I receive an error meesage stating, "Ambiguous output redirect." Wojtek correctly pointed out that there should be no space between the 2 and the >, but I suspect the primary problem is that "2>" is Bourne/Korn/Bash syntax and your root shell is most probably csh. Does it work any better if you first start /bin/sh: # sh sh will give you another # prompt, and then it should work: # /usr/local/gtar/bin/tar -cvf - /home/hallja 2> /var/log/test.txt | /usr/local/bin/gpg --encrypt "recipient" | dd of=/dev/nsa0 obs=128k After it finishes, and sh prompts again: # ^D The Ctrl-D will exit from sh, returning to the csh prompt.