xshell 脚本的学习

1.xhell 脚本俗话说就是一堆 Linux 命令的集合

2.一般自动清理日志,监控脚本,还有数据库的执行和备份的脚本

写一个自己的xhell脚本

1.vi test.sh 

2.写入内容 

echo "hello world"

pwd 查看当前目录

3.执行脚本命令  

第一种运行方法:

sh test.sh 

第二种运行方法:

 chmod +x test.sh   加上可执行权限

./test.sh

 

posted @ 2021-10-20 18:23  测试董先生  阅读(305)  评论(0编辑  收藏  举报