From owner-freebsd-questions@FreeBSD.ORG Thu Sep 18 14:48:24 2008 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 8594D106567B for ; Thu, 18 Sep 2008 14:48:24 +0000 (UTC) (envelope-from glarkin@FreeBSD.org) Received: from mail1.sourcehosting.net (113901-app1.sourcehosting.net [72.32.213.11]) by mx1.freebsd.org (Postfix) with ESMTP id 63EA68FC1F for ; Thu, 18 Sep 2008 14:48:24 +0000 (UTC) (envelope-from glarkin@FreeBSD.org) Received: from 68-189-244-97.dhcp.oxfr.ma.charter.com ([68.189.244.97] helo=Gregory-Larkins-Computer.local) by mail1.sourcehosting.net with esmtp (Exim 4.69 (FreeBSD)) (envelope-from ) id 1KgKnl-0000xl-0t; Thu, 18 Sep 2008 10:48:15 -0400 Received: from [127.0.0.1] (fireball.entropy.prv [192.168.1.12]) by Gregory-Larkins-Computer.local (Postfix) with ESMTP id F096224F1C66; Thu, 18 Sep 2008 10:48:10 -0400 (EDT) Message-ID: <48D26A30.7040500@FreeBSD.org> Date: Thu, 18 Sep 2008 10:48:16 -0400 From: Greg Larkin Organization: The FreeBSD Project User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: redtick@sbcglobal.net References: <17473.88889.qm@web81206.mail.mud.yahoo.com> In-Reply-To: <17473.88889.qm@web81206.mail.mud.yahoo.com> X-Enigmail-Version: 0.95.7 OpenPGP: id=1C940290 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: -1.2 (-) Cc: help help Subject: Re: passing variable to at command X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: glarkin@FreeBSD.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Sep 2008 14:48:24 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Mark Busby wrote: > Is there a way to pass variables to a shell script from the command line with the at command? > What I've been trying is something like : at -f '/path/script 20 test' 8:10 091808 : Where 20 and test set variables in the script. > > I've tried googling the at command for help but there's a lot of "at" in the world. > > Thanks Hi Mark, My reading of the at(1) man page (http://www.freebsd.org/cgi/man.cgi?query=at&apropos=0&sektion=0&manpath=FreeBSD+7.0-RELEASE&format=html) implies that the -f option is used to specify a file containing the commands you wish to execute, not the actual commands themselves. In that case, create a temporary file with commands like '/path/script 20 test', etc. in it and then use "at -f" to run the commands in that file at the specified time. Regards, Greg - -- Greg Larkin http://www.FreeBSD.org/ - The Power To Serve http://www.sourcehosting.net/ - Ready. Set. Code. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFI0mow0sRouByUApARAnZzAJ4vFomoN4zTLWmlzoRpuZJwDLExAQCfZoCb lRyDaLaj+Te+wayACyfME3s= =zAc0 -----END PGP SIGNATURE-----