Shell 是一个用 C 语言编写的程序,它是用户使用 Linux 的桥梁。Shell 既是一种命令语言,又是一种程序设计语言。Shell 是指一种应用程序,这个应用程序提供了一个界面,用户通过这个界面访问操作系统内核的服务。Ken Thompson 的 sh 是第一种 Unix Shell,Windows Explorer 是一个典型的图形界面 Shell。
国际惯例:运行第一个shell脚本,入门shell
[root@shell scripts]# cat /server/scripts/test.sh #/bin/bash echo "hello world" [root@shell scripts]# /bin/sh /server/scripts/test.sh hello world [root@shell scripts]# sh /server/scripts/test.sh hello world -bash: ./server/scripts/test.sh: No such file or directory [root@shell scripts]# chmod +x /server/scripts/test.sh [root@shell scripts]# . /server/scripts/test.sh hello world
待续