Date: Wed, 21 Oct 2009 14:55:32 +0100 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: Jay Hall <jhall@socket.net> Cc: freebsd-questions@freebsd.org Subject: Re: gnu tar checkpoint variable expansion Message-ID: <4ADF12D4.9020003@infracaninophile.co.uk> In-Reply-To: <B0508ECD-C05C-4378-8A8F-F35CB0C2274B@socket.net> References: <B0508ECD-C05C-4378-8A8F-F35CB0C2274B@socket.net>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig29E4B5C82DF886DE85FD0676 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Jay Hall wrote: > Ladies and Gentlemen, >=20 > I am working with gnu tar checkpoints this morning can cannot seem to=20 > get variables to expand properly when they are passed as part of a=20 > checkpoint action. Following is how I am using gnu tar >=20 > DIR=3D"/home/test" > WHATTOBACKUP=3D"/home/somedir" >=20 > /usr/local/gtar-1.22/bin/tar -cf - ${WHATTOBACKUP} \ > --checkpoint-action=3D'echo=3DCheckpoint #%u'=20 > --checkpoint-action=3D'exec=3D/usr/local/scripts/check_disk_usage.sh ${= DIR}' >=20 > When I use ${DIR} as a parameter, it is not sent to the=20 > check_disk_usage_script. However, if I replace ${DIR} with /home/test,= =20 > everything works fine. >=20 > Any suggestions anyone has would be greatly appreciated. That's fairly basic shell syntax. Use "double quotes" on any string wher= e you want variable interpolation. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW --------------enig29E4B5C82DF886DE85FD0676 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.13 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEAREIAAYFAkrfEtoACgkQ8Mjk52CukIzPpgCfRdjeCFGGSL7v/wgYG0p47EZo JdAAn3R3QNy/O51Kq3d1ZE3HxlC2Yp5M =GbpW -----END PGP SIGNATURE----- --------------enig29E4B5C82DF886DE85FD0676--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4ADF12D4.9020003>