Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/shell/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
是否有一个相当于bash';s`<<<';重定向操作符?_Bash_Shell - Fatal编程技术网

是否有一个相当于bash';s`<<<';重定向操作符?

是否有一个相当于bash';s`<<<';重定向操作符?,bash,shell,Bash,Shell,我正试图从cgi脚本执行at命令。该脚本作为Ubuntu(www-data)上的默认Apache2用户执行,但默认shell是/bin/sh,而不是bash。除了在上运行作为www-data(参见我的另一个)的安全问题之外,我可以更改默认的shell,但是我想知道,有没有更便携的方法来编写这个bash友好命令? 现在+5分钟 at now + 5 minutes <<< 'python my_script.py data_arg' echo 'python my_script

我正试图从cgi脚本执行
at
命令。该脚本作为Ubuntu(
www-data
)上的默认Apache2用户执行,但默认shell是
/bin/sh
,而不是
bash
。除了在上运行
作为
www-data
(参见我的另一个)的安全问题之外,我可以更改默认的shell,但是我想知道,有没有更便携的方法来编写这个
bash
友好命令?

现在+5分钟

at now + 5 minutes <<< 'python my_script.py data_arg'
echo 'python my_script.py data_arg' | at now + 5 minutes
at now + 5 minutes <<EOF
python my_script.py data_arg
EOF