Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Sep 2008 10:48:16 -0400
From:      Greg Larkin <glarkin@FreeBSD.org>
To:        redtick@sbcglobal.net
Cc:        help help <freebsd-questions@freebsd.org>
Subject:   Re: passing variable to at command
Message-ID:  <48D26A30.7040500@FreeBSD.org>
In-Reply-To: <17473.88889.qm@web81206.mail.mud.yahoo.com>
References:  <17473.88889.qm@web81206.mail.mud.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
-----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-----




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48D26A30.7040500>