Capturing tar output
hv
hv at tuebingen.mpg.de
Thu Sep 11 08:28:53 UTC 2008
Am 11.09.2008 um 03:41 schrieb jhall at 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 at tuebingen.mpg.de> (Fon: ++49-7071-601-511, Fax: -826)
Campus Max-Planck-Institute, Spemannstr. 32-41, Tübingen, Germany
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20080911/efa896a8/PGP.pgp
More information about the freebsd-questions
mailing list