Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Sep 2008 10:28:43 +0200
From:      hv <hv@tuebingen.mpg.de>
To:        freebsd-questions@freebsd.org
Subject:   Re: Capturing tar output
Message-ID:  <CD050CF5-52C1-4CC4-BADD-938D382583AC@tuebingen.mpg.de>
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

[-- Attachment #1 --]

Am 11.09.2008 um 03:41 schrieb jhall@vandaliamo.net:

>>
>> 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."

Are you using the csh/tcsh ?According to the manual: (man tcsh, below  
Input/Ouput)
---
        The  shell  cannot  presently  redirect  diagnostic output  
without also
        redirecting standard output, but `(command  >  output-file)   
 >&  error-
        file'  is often an acceptable workaround.  Either output-file  
or error-
        file may be `/dev/tty' to send output to the terminal.
---

To make the above example work you could change the shell by typing
# sh
and then type the suggested command  above.
If you want to put your commands into file (a script)  put the magic  
line
#!/bin/sh
on top of it.

Regards
--
Henry Vogt <hv@tuebingen.mpg.de> (Fon: ++49-7071-601-511, Fax: -826)
Campus Max-Planck-Institute, Spemannstr. 32-41, Tübingen, Germany


[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)

iEYEARECAAYFAkjI1rsACgkQiF3PvXvQ0FCf6wCgsMgJgDsyOHWP1TxqZMLSyF+P
D9oAoK7uGtd10RtTAE54RG8GV9vdPYGl
=JTtE
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CD050CF5-52C1-4CC4-BADD-938D382583AC>