Linux Shell Script (一) -- Basic Concepts
1. Run the shell
$ sh script.sh # Assuming script is in the current directory.
Or:
$ sh /home/path/script.sh # Using full path of script.sh.
#讲脚本改为可执行模式
$ chmod a+x script.sh
$ ./script.sh #./ represents the current directory
Or:
$ /home/path/script.sh # Full path of the script is used
技术改变世界