Thread View: comp.unix.shell
3 messages
3 total messages
Started by Frank B. Mostek
Tue, 13 Nov 1990 18:57
at command args
Author: Frank B. Mostek
Date: Tue, 13 Nov 1990 18:57
Date: Tue, 13 Nov 1990 18:57
9 lines
705 bytes
705 bytes
Would like to be able to pass parameters to a script invoked by the "at" command. Have tried: at now + 1 minute test xyz where xyz is the parameter I want to pass to the test script. The script is executed, but the parameter is ignored.
Re: at command args
Author: Willis H. Renkel
Date: Wed, 14 Nov 1990 14:30
Date: Wed, 14 Nov 1990 14:30
10 lines
840 bytes
840 bytes
In article <5195@crystal1.UUCP>, mostek@motcid.UUCP (Frank B. Mostek) writes: > Would like to be able to pass parameters to a script invoked by the > "at" command. Have tried: > > at now + 1 minute test xyz > > where xyz is the parameter I want to pass to the test > script. > > The script is executed, but the parameter is ignored.
Re: at command args
Author: Rob Lemley
Date: Wed, 14 Nov 1990 17:27
Date: Wed, 14 Nov 1990 17:27
48 lines
1895 bytes
1895 bytes
In <5195@crystal1.UUCP> mostek@motcid.UUCP (Frank B. Mostek) writes:
>Would like to be able to pass parameters to a script invoked by the
>"at" command. Have tried:
> at now + 1 minute test xyz
> where xyz is the parameter I want to pass to the test
> script.
>The script is executed, but the parameter is ignored.
First, a caveat, aside from any problems with "at":
BE CAREFUL WHEN YOU NAME A SCRIPT test. test IS A BUILTIN
COMMAND IN THE MODERN sh AND ksh. EXECUTING test WITHOUT A
QUALIFYING PATH NAME WILL USUALLY EXECUTE THE SHELL'S BUILTIN
test COMMAND OR /bin/test ON OLDER SHELLS. ON OLDER SHELLS
THIS WILL DEPEND ON HOW YOUR $PATH IS SET UP. NAMING YOUR OWN
SCRIPT test CAN ALSO CAUSE OTHER SHELL SCRIPTS TO BREAK BECAUSE
THEY PROBABLY EXPECT DIFFERENT BEHAVIOR FROM test THAN WHAT YOU
PROBABLY CODED!
Now, back to "at":
Are you sure the script is executed? What version of Unix are you on?
On System V, Release 3, "at" will not take commands from the command line.
When I try your example, I get:
at: bad date specification
The usual way to do this would be:
$ at now + 1 minute
test xyz
<control-d> #or whatever your EOF char is
From the User's Ref Man:
at and batch read commands from standard input to be
executed at a later time. ^^^^^^^^^^^^^^
Rob
--
Rob Lemley
System Consultant, Scanning Software, Intergraph, Huntsville, AL
rcl@b15.ingr.com OR ...!uunet!ingr!b15!rob
205-730-1546
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads