Reputation: 7431
I'm trying to execute an at
command from a cgi script. The script is executed as the default Apache2 user on Ubuntu (www-data
) but the default shell is /bin/sh
and not bash
. Aside from security issues of running at
as www-data
(see my other question), I could change the default shell, but I'm wondering, is there a more portable way to write this bash
friendly command?
at now + 5 minutes <<< 'python my_script.py data_arg'
Upvotes: 8
Views: 3938
Reputation: 531808
<<<
is also just a shortcut for a single-line here document.
at now + 5 minutes <<EOF
python my_script.py data_arg
EOF
Upvotes: 5