|
第一种 : 将hello这个档案的权限设定为可执行。
[foxman@foxman bash]# chmod 755 hello
执行
[foxman@foxman bash]# ./hello
hello world
*************************
第二种 : 使用bash内建指令"source"或"."。
[foxman@foxman bash]# source hello
hello world
或
[foxman@foxman bash]# . hello
hello world
*************************
第三种 : 直接使用sh/bash/tcsh指令来执行。
[foxman@foxman bash]# sh hello
hello world
或
[foxman@foxman bash]# bash hello
hello world
这几种执行方式有何区别 |
|