Date: Thu, 11 Sep 2008 01:25:42 -0700 From: perryh@pluto.rain.com To: jhall@vandaliamo.net Cc: wojtek@wojtek.tensor.gdynia.pl, freebsd-questions@freebsd.org Subject: Re: Capturing tar output Message-ID: <48c8d606.hss%2BAMFX14shlIQG%perryh@pluto.rain.com> In-Reply-To: <50349.66.84.183.146.1221097271.squirrel@admintool.trueband.net> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
> > 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48c8d606.hss%2BAMFX14shlIQG%perryh>
