Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The command you specify to <code>at</code> is executed by <code>/bin/sh</code>, but sh can invoke any command, executed directly or by any specified interpreter.</p> <p>The following works on my Ubuntu 12.04 system with the bash shell:</p> <pre><code>$ cat hello.php #!/usr/bin/php &lt;?php echo "Hello, PHP\n"; ?&gt; $ echo "$PWD/hello.php &gt; hello.php.out" | at 16:11 warning: commands will be executed using /bin/sh job 4 at Sat Aug 25 16:11:00 2012 $ date Sat Aug 25 16:11:05 PDT 2012 $ cat hello.php.out Hello, PHP $ </code></pre> <p>In some cases, you'll have to do some extra work to set environment variables correctly (it's not necessary for this simple case). Quoting the man page:</p> <blockquote> <p>For both <strong>at</strong> and <strong>batch</strong>, commands are read from standard input or the file specified with the <strong>-f</strong> option and executed. The working directory, the environment (except for the variables <strong>BASH_VERSINFO</strong>, <strong>DISPLAY</strong>, <strong>EUID</strong>, <strong>GROUPS</strong>, <strong>SHELLOPTS</strong>, <strong>TERM</strong>, <strong>UID</strong>, and <strong>_</strong>) and the umask are retained from the time of invocation.</p> <p>As <strong>at</strong> is currently implemented as a setuid program, other environment variables (e.g. <strong>LD_LIBRARY_PATH</strong> or <strong>LD_PRELOAD</strong>) are also not exported. This may change in the future. As a workaround, set these variables explicitly in your job.</p> </blockquote>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload