zoukankan      html  css  js  c++  java
  • 在shell中运行以不同方式运行脚本

    在shell当中,可以有3中方式运行脚本:

    1 . ./script_name 或者source ./script_name

    2 直接./script_name

    3 ./script_name &

    加入脚本script_name中有两个命令command1,command2,那么,当以第一种方式运行时,command1和command2都在当前shell中运行,并没有产生subshell,如下图所示:

    当script_name以第2中方式运行时,当前shell会产生一个subshell,command1和command2在subshell中运行,而当前的shell会一直等待subshell运行结束之后才继续运行,如下图所示:

    当script_name以第3种方式运行时,当前shell会产生一个subshell,command1和command2在subshell中运行,但是,当前shell不会等待shubshell运行结束后再运行,而是同时和subshell一起继续运行,如下图所示:

  • 相关阅读:
    Django url
    Django 命令
    MVC和MTV模式
    pymysql操作
    mysql 基本操作
    jquery基本操作
    外边距内边距
    css
    Html
    __name__ __main__ 作用
  • 原文地址:https://www.cnblogs.com/chaoguo1234/p/5723606.html
Copyright © 2011-2022 走看看