您好,欢迎来到外链网!
当前位置:外链网 » 站长资讯 » 专业问答 » 文章详细 订阅RssFeed

centos怎么执行脚本(centos怎么执行命令)

来源:互联网 浏览:61次 时间:2023-04-08

方法一:切换到shell脚本所在的目录(此时,称为工作目录)执行shell脚本

CentOS 7如何实现定时执行python脚本
cd /data/shell
./hello.sh

方法二:以绝对路径的方式去执行bash shell脚本

auto.js如何写定时点击脚本 CentOS操作系统基本优化方案,大家一起来完善shell脚本吧...
/data/shell/hello.sh

方法三:直接使用bash 或sh 来执行bash shell脚本

CentOS中如何编写Shell脚本
cd /data/shell
bash hello.sh

cd /data/shell
sh hello.sh

方法四:在当前的shell环境中执行bash shell脚本

cd /data/shell
. hello.sh


cd /data/shell
source hello.sh
(www.Downzz.com)

本文从互联网转载,来源地址:www.downzz.com/centosjiaocheng/116907.html,原作者保留一切权利,若侵权或引用不当,请联系茶猫云(cmy.cn)删除。【茶猫云,优质云服务器提供商】