shell的父子进程
Posted 一夜飘零
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了shell的父子进程相关的知识,希望对你有一定的参考价值。
2017年1月11日, 星期三

shell的父子进程

启动/执行方式:
当前shell:
#!/bin/bash 必须行首
首行的#!会被内核发现,是一个魔数,内核会创建后面/bin/bash的进程,其他方式都会认为是注释

. source file
新建子shell:

sh file or ./file
变量
export
export的变量能被子进程引用
以上是关于shell的父子进程的主要内容,如果未能解决你的问题,请参考以下文章