首页 > 系统服务 > 详细

Shell.01.shell脚本的格式和执行

时间:2020-02-07 13:43:41      阅读:47      评论:0      收藏:0      [点我收藏+]

1.标明shell类型:

 #!/bin/bash 或 #!/bin/python, etc.

#!/bin/bash #Author: X 
#Date: 2020-02-07 
#Version: 1.0 
#Description: For Shell study

2.更改脚本为可执行:

chmod +x yourShell.sh


3.执行

方式1:

./yourShell.sh

方式2:

bash yourShell.sh

 

4.远程调用脚本在本机执行
curl http://ip/yourShell.sh | bash

 

 

Shell.01.shell脚本的格式和执行

原文:https://www.cnblogs.com/initx/p/12272476.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!