Is it possible to have the at command return somehow the job id it just submitted when used from within a script? (kind of like $? retrieves the last exit code or $$/$! retrieve the PID of the command just executed).
|
feedback
|
|
Assuming that the job you want to run is in a file called
The So it get it into a variable, you can do:
| |||
|
feedback
|
echo "touch foo" | at now, I get e.g.job 3 at Thu Dec 15 17:14:52 2011as output — you don't? Likewise inside a script, it writes to standard output, from where it can be parsed. – Daniel Beck Dec 15 '11 at 16:16