详细信息如下:
In [32]: !cat /home/user/tmp_2405/tmp.sh
echo "hello"
In [33]: !/home/user/tmp_2405/tmp.sh
hello
In [34]: !cat /etc/cron.d/tmp
* * * * * /home/user/tmp_2405/tmp.sh
In [35]: !sudo crontab -l
[sudo] password for user:
* * * * * /home/user/tmp_2405/tmp.sh
In [36]: !sudo cron -f -L 15
(blank)
解释器是 IPython,但没什么区别
update\solution:
echo "hello"
打印到 stdout,这可能是在子进程
touch
命令按预期工作