POSIX definiu que pode usar SHELL variável de ambiente como alternativa a /bin/sh , mas não a restringiu:
SHELL
Determine a name of a command interpreter to be used to invoke the at-job. If the variable is unset or null, sh shall be used. If it is set to a value other than a name for sh, the implementation shall do one of the following: use that shell; use sh; use the login shell from the user database; or any of the preceding accompanied by a warning diagnostic about which was chosen.
Algumas implementações de at podem lhe dar a capacidade de escolher qual shell você deseja executar, como -k para shell Korn, -c para C-shell. E nem toda implementação de at allow SHELL para substituir sh . Assim, o POSIX também garantiu que a maneira confiável de usar outro shell é explicitamente chamá-lo :
Some implementations do not allow substitution of different shells using SHELL. System V systems, for example, have used the login shell value for the user in /etc/passwd. To select reliably another command interpreter, the user must include it as part of the script, such as:
$ at 1800
myshell myscript
EOT
job ... at ... $
Uma maneira simples de usar bash para executar seu script é passar bash script como stdin para at :
echo "bash /path/to/yourscript" | at <time>
Exemplo:
echo "bash /path/to/yourscript" | at 16:30
executará bash /path/to/yourscript às 16:30 de hoje.