运行脚本方法
1.# bash /root/datetime.sh
i love Linux
2020-05-30 13:54:02
2. # cat /root/datetime.sh |bash
i love Linux
2020-05-30 13:54:35
3.#chmod +x /root/datetime.sh
绝对路径 /root/datetime.sh
相对路径cd /datetime.sh
./datetime.sh
原文:https://www.cnblogs.com/weiweirui/p/12997367.html