您现在的位置是:网站首页> 编程资料编程资料
Shell中调用、引用、包含另一个脚本文件的三种方法_linux shell_
2023-05-26
346人已围观
简介 Shell中调用、引用、包含另一个脚本文件的三种方法_linux shell_
脚本 first (测试示例1)
first
#!/bin/bash
echo 'your are in first file'
方法一:使用source
#!/bin/bash
echo 'your are in second file'
source first
方法二:使用.
#!/bin/bash
echo 'your are in second file'
. first
方法三:使用sh
#!/bin/bash
echo 'your are in second file'
sh first
您可能感兴趣的文章:
相关内容
- LINUX下的流量监控shell脚本_linux shell_
- 利用管道实现sudo命令免输入密码的方法_linux shell_
- 把mysql查询结果保存到文件的shell脚本_linux shell_
- shell获取命令行参数示例分享_linux shell_
- vtune自动安装脚本分享_linux shell_
- 获取站点的各类响应时间(dns解析时间,响应时间,传输时间)_linux shell_
- shell脚本转发80端口数据包给Node.js服务器_linux shell_
- centos中mysql备份数据库脚本分享_linux shell_
- shell中删除文件中重复行的方法_linux shell_
- shell替换文件中的文件路径脚本分享_linux shell_
