shell脚本
第 1 章 Shell 概述 第 2 章 Shell 解析器 ( 1 ) Linux 提供的 Shell 解析器有: [atguigu@hadoop101 ~]$ cat /etc/shells /bin/sh /bin/bash /sbin/nologin /bin/dash /bin/tcsh /bin/csh ( 2 ) bash 和 sh 的关系 [atguigu@hadoop101 bin]$ ll | grep bash -rwxr-xr-x. 1 root root 941880 5 月 11 2016 bash lrwxrwxrwx. 1 root root 4 5 月 27 2017 sh -> bash ( 3 ) Centos 默认的 解析 器 是bash [atguigu@hadoop102 bin]$ echo $SHELL /bin/bash 第 3 章 Shell 脚本 入门 1 . 脚本格式 脚本以 #!/bin/bash 开头 (指定解析 器 ) 2 . 第一个 Shell 脚本 :helloworld ( 1 )需求:创建一个 Shell 脚本,输出 helloworld ( 2 ) 案例 实操: [atguigu@hadoop101 datas]$ touch helloworld.sh [atguigu@hadoop101 datas]$