Subject: Iterating through "fields" in a list
To: None <netbsd-users@netbsd.org>
From: Jan Danielsson <jan.m.danielsson@gmail.com>
List: netbsd-users
Date: 02/01/2007 09:15:25
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigB6B7248D425390898EAFBC45
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Hello all,
(Using /bin/sh)
I have a set of backup scripts which contain this:
tar .... | bzip2 | gpg -r $ENCTO > blarg.tar.bz2.gpg
ENCTO is a variable which is set prior to running the scrips. Now I
have realized that I need to encrypt to several recipients. I.e.:
tar .... | bzip2 | gpg -r foo -r bar > blarg.tar.bz2.gpg
Is there some painfully obvious way to construct the string:
"-r foo -r bar"
from the environment variable:
ENCTO=3Dfoo bar
(Using space as separator)
"for" obviously uses file names, and doesn't seem to be able to use
space separated lists for processing.
(Don't even suggest that I should create two files named "foo" and
"bar" somewhere so that I can use "for". Even I realize how ugly *that*
is. ;-)
--=20
Kind regards,
Jan Danielsson
--------------enigB6B7248D425390898EAFBC45
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (NetBSD)
iD8DBQFFwaGjbgs4ia4rq9IRCkXUAJ4vS89UvSPvTrmjR68Rpg5QgVQmRgCfTzMV
Bd4lsuc9fXQ4i6Miy/j3B6A=
=2ybH
-----END PGP SIGNATURE-----
--------------enigB6B7248D425390898EAFBC45--