From owner-freebsd-questions@FreeBSD.ORG Wed Oct 21 13:52:20 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 686CD1065693 for ; Wed, 21 Oct 2009 13:52:20 +0000 (UTC) (envelope-from trond@fagskolen.gjovik.no) Received: from smtp.fagskolen.gjovik.no (smtp.fagskolen.gjovik.no [IPv6:2001:700:1100:1:200:ff:fe00:b]) by mx1.freebsd.org (Postfix) with ESMTP id DE5358FC23 for ; Wed, 21 Oct 2009 13:52:19 +0000 (UTC) Received: from mail.fig.ol.no (localhost [127.0.0.1]) by mail.fig.ol.no (8.14.3/8.14.3) with ESMTP id n9LDqFA6065728 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 21 Oct 2009 15:52:15 +0200 (CEST) (envelope-from trond@fagskolen.gjovik.no) Received: from localhost (trond@localhost) by mail.fig.ol.no (8.14.3/8.14.3/Submit) with ESMTP id n9LDqFIj065724 for ; Wed, 21 Oct 2009 15:52:15 +0200 (CEST) (envelope-from trond@fagskolen.gjovik.no) X-Authentication-Warning: mail.fig.ol.no: trond owned process doing -bs Date: Wed, 21 Oct 2009 15:52:10 +0200 (CEST) From: =?ISO-8859-1?Q?Trond_Endrest=F8l?= Sender: Trond.Endrestol@fagskolen.gjovik.no To: FreeBSD questions In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) Organization: =?ISO-8859-1?Q?Fagskolen_i_Gj=F8vik?= OpenPGP: url=http://fagskolen.gjovik.no/~trond/trond.key MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="2055831798-1884141639-1256133135=:65671" X-Spam-Status: No, score=-1.4 required=5.0 tests=ALL_TRUSTED autolearn=failed version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on mail.fig.ol.no 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:52:20 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --2055831798-1884141639-1256133135=:65671 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wed, 21 Oct 2009 08:44-0500, Jay Hall wrote: > [...] Following is how I am using gnu tar > > DIR="/home/test" > WHATTOBACKUP="/home/somedir" > > /usr/local/gtar-1.22/bin/tar -cf - ${WHATTOBACKUP} \ > --checkpoint-action='echo=Checkpoint #%u' > --checkpoint-action='exec=/usr/local/scripts/check_disk_usage.sh ${DIR}' Try this: /usr/local/gtar-1.22/bin/tar -cf - ${WHATTOBACKUP} \ --checkpoint-action='echo=Checkpoint #%u' \ --checkpoint-action="exec=/usr/local/scripts/check_disk_usage.sh ${DIR}" The use of single quotes prohibits the expansion of environment variables. Use double qoutes instead. - -- - ---------------------------------------------------------------------- Trond Endrestøl | Trond.Endrestol@fagskolen.gjovik.no ACM, NAS, NUUG, SAGE, USENIX | FreeBSD 7.2-STABLE & Alpine 2.00 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (FreeBSD) iEYEARECAAYFAkrfEg8ACgkQbYWZalUoEltZnACggXsvYV1wq/91nSUabiLEhuBt 9qIAn1FN+EqFu4IdNhQbB9Y5IMtJtnGq =myOf -----END PGP SIGNATURE----- --2055831798-1884141639-1256133135=:65671--