在Shell脚本的执行过程中,Shell脚本支持调用另一个Shell脚本,调用的格式为:程序名

实例:在Shell脚本test1中调用test2。

1、调用test2
#test1脚本
root@ubuntu:/home/study# vi test1;

#!/bin/bash
 
echo "The main name is $0";
./test2;
echo "The first string is $1";
 

#test2脚本
root@ubuntu:/home/study# vi test2;

#! /bin/bash
 
echo "How are you $USER?";
 

root@ubuntu:/home/study# chmod +x test1;
root@ubuntu:/home/study# chmod +x test2;
root@ubuntu:/home/study# ./test1 ljq
The main name is ./test1
How are you root?
The first string is ljq
root@ubuntu:/home/study#

最新文章

  1. Mac制作U盘系统(OS X El Capitan)教程
  2. 浅析天猫H5站点
  3. Android--数据解析
  4. Redisd VS Memcached
  5. Resource annotation is not supported on static fields
  6. Scrum会议5(Beta版本)
  7. DRL之:策略梯度方法 (Policy Gradient Methods)
  8. ORACLE之表
  9. HDU 5515 Game of Flying Circus 二分
  10. Redis+PHP扩展的安装和Redis集群的配置 与 PHP负载均衡开发方案
  11. Linux中shell文件操作大全
  12. 1.跨平台开发之~ VSCode开发第一个C程序
  13. canvas基础(一)
  14. Cloudera Manager和CDH5.8离线安装
  15. VritualBox安装CentOS及安装增强工具图文教程
  16. 前面的内容 也是要去掉白名单 和 8.8.8.8这种非问题IP的 高风险 么? (目前我们没有获取客户的中风险、低风险数据,可以处理掉高风险)
  17. 安装 kubernetes v1.11.1
  18. Linux系统学习之软件安装
  19. SpringBoot2.x使用Dev-tool热部署
  20. 【模态窗口-Modeldialog】提交请求时禁止在新窗口打开页面的处理方法

热门文章

  1. 7、Semantic-UI之图标与按钮组
  2. javascript高级程序设计读书笔记----面向对象的程序设计
  3. [LeetCode 题解]: Longest Common Prefix
  4. 强大的CSS 属性选择符 配合 stylish 屏蔽新浪微博信息流广告
  5. pageadmin建站软如何修改和设置iis站点应用程序池
  6. maven(私库)上传jar包
  7. 【转】C#具名参数和可选参数
  8. ArchLinux下Ecplise软件报错
  9. 现代 JavaScript 框架存在的主要原因
  10. 10分钟教你用Python玩转微信之抓取好友个性签名制作词云