Re: passing variable to at command

2008-09-18 Thread Greg Larkin
-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=atapropos=0sektion=0manpath=FreeBSD+7.0-RELEASEformat=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-

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: passing variable to at command

2008-09-18 Thread Michaël Le Barbier

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.
  
You will have to write your commands in a file, and supply the name of 
this file as the `-f' argument for at. The file is processed by SH. You 
can also say: echo /path/script 20 test | at 8:10 091808

I've tried googling the at command for help but there's a lot of at in the 
world

All of this is written in the at man page!
--
Cheers,
Michaël
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]