650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/7E/AC/wKiom1cGe1ui4oqIAABm6P93Pb8114.jpg "height=" 142 " Width= "192" alt= "Wkiom1cge1ui4oqiaabm6p93pb8114.jpg"/>
Shell script to today, I can only kept sequential execution, try to explore its more powerful features.
A main file, main, three call files Shell1, Shell2, Shell3, the calling file differs only in the display content. (no background Execution (&) is used in main, then the content is displayed after the end of the execution of the call, and then done in turn.) ) script as follows:
[email protected] lab-shell-script]$ cat Main#!/bin/bash. Shell1 &. Shell2 &. Shell3 &echo "Shell script ends."
[[email protected] lab-shell-script]$ cat shell1#!/bin/bashfor ((i=0; i<3; i++)); Do echo "$i, Hello file." Sleep 1done
Look at the results after execution, .... ( the contents of the calling file are not displayed until the main file execution finishes.) Also, the execution order of the calling file is "unordered")
[[email protected] lab-shell-script]$./mainshell script ends.1, hello Mtf[[email protected] lab-shell-script]$ 1, hello y Angtao1, hello Sunny2, hello sunny2, hello mtf2, hello Yangtao3, hello sunny3, hello Yangtao3, hello MTF
Shell Execution Order