why is an existing file not overwritten by output-file?

Anthony E. Greene agreene@pobox.com
Wed Jun 5 13:44:02 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05-Jun-2002/13:32 +0200, akorthaus@web.de wrote:
>Is there another possibility instead of:
>
>rm output.gpg | mysqldump database | gpg -o
>output.gpg -e --default-recipient andreas
>
>But that doesn=B4t work, the file is removed, but nothing else happens. =
And
>what happens, if 'output.gpg' does not exist?
>Overwriting would be the best idea, but how?

Assuming the mysqldump command produces output on STDOUT, and you have
specified a default recipient in your ~/.gnupg/options file, this should
encrypt the database dump to your public key and overwrite the exising
output.gpg file:

  mysqldump database | gpg -e > output.gpg


Tony
- --=20
Anthony E. Greene <mailto:agreene@pobox.com>
OpenPGP Key: 0x6C94239D/7B3D BD7D 7D91 1B44 BA26 C484 A42A 60DD 6C94 239D
AOL/Yahoo Chat: TonyG05         HomePage: <http://www.pobox.com/~agreene/=
>
Linux. The choice of a GNU generation <http://www.linux.org/>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Anthony E. Greene <mailto:agreene@pobox.com> 0x6C94239D

iD8DBQE8/fmqpCpg3WyUI50RAgSOAJ9Ld/3+HuW9q+zHyXvAfcf22oslggCfXCA8
LDF/WL7pOBhVjWofdLQi+IM=3D
=3DCbOd
-----END PGP SIGNATURE-----