From owner-freebsd-questions@FreeBSD.ORG Wed Oct 21 13:55:44 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6AE921065696 for ; Wed, 21 Oct 2009 13:55:44 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (gate6.infracaninophile.co.uk [IPv6:2001:8b0:151:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id E86CE8FC17 for ; Wed, 21 Oct 2009 13:55:43 +0000 (UTC) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [IPv6:::1]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.3/8.14.3) with ESMTP id n9LDtcC9018191; Wed, 21 Oct 2009 14:55:39 +0100 (BST) (envelope-from m.seaman@infracaninophile.co.uk) X-DKIM: Sendmail DKIM Filter v2.8.3 smtp.infracaninophile.co.uk n9LDtcC9018191 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=infracaninophile.co.uk; s=200708; t=1256133339; bh=sdoEy6b/DJWUioxrFtl6Y9UreuKfSxlkZBcJT89ACd8=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Cc:Content-Type:Date:From:In-Reply-To: Message-ID:Mime-Version:References:To; z=Message-ID:=20<4ADF12D4.9020003@infracaninophile.co.uk>|Date:=20W ed,=2021=20Oct=202009=2014:55:32=20+0100|From:=20Matthew=20Seaman= 20|Organization:=20Infracaninophi le|User-Agent:=20Thunderbird=202.0.0.23=20(X11/20090823)|MIME-Vers ion:=201.0|To:=20Jay=20Hall=20|CC:=20freebsd-que stions@freebsd.org|Subject:=20Re:=20gnu=20tar=20checkpoint=20varia ble=20expansion|References:=20|In-Reply-To:=20|X-Enigmail-Version:=200.95.6|Content-Type:=20multipar t/signed=3B=20micalg=3Dpgp-sha256=3B=0D=0A=20protocol=3D"applicati on/pgp-signature"=3B=0D=0A=20boundary=3D"------------enig29E4B5C82 DF886DE85FD0676"; b=sMfzJsFSZaAcj+0a3X8HhZcjy8HwrneSNMVebUH3ivNkgQxEN6Z3ro37xF3eM/PKq ooswO56XbCvA0FklsOrdlhhGhD0ajPT89jjZOUFBBMeVkCkKvU0hYAq8L/r0vpkj/l EXh68nWijQr43YMJXthTLBm9L0Acz/WJoorSPW8k= X-Authentication-Warning: happy-idiot-talk.infracaninophile.co.uk: Host localhost [IPv6:::1] claimed to be happy-idiot-talk.infracaninophile.co.uk Message-ID: <4ADF12D4.9020003@infracaninophile.co.uk> Date: Wed, 21 Oct 2009 14:55:32 +0100 From: Matthew Seaman Organization: Infracaninophile User-Agent: Thunderbird 2.0.0.23 (X11/20090823) MIME-Version: 1.0 To: Jay Hall References: In-Reply-To: X-Enigmail-Version: 0.95.6 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig29E4B5C82DF886DE85FD0676" X-Virus-Scanned: clamav-milter 0.95.2 at happy-idiot-talk.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VERIFIED,NO_RELAYS autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on happy-idiot-talk.infracaninophile.co.uk Cc: freebsd-questions@freebsd.org Subject: Re: gnu tar checkpoint variable expansion X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Oct 2009 13:55:44 -0000 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--