X实验室

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

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

 

 
posted on 2020-02-07 11:48  Initial-X  阅读(241)  评论(0编辑  收藏  举报