shell时操作系统的最外层,用于构建用户与内核链接的桥梁
常用的shell是bash
创建一个shell脚本文件
vi 1.sh
#!/bin/bash #Filename: 1.c #auto echo hello world #by authors hou 2019 echo "hello world"
运行脚本:
chmod o+x 文件名 给脚本一个执行权限
root@yisheng-v-m:/home/yisheng/shell# chmod o+x 1.sh root@yisheng-v-m:/home/yisheng/shell# ./1.sh hello world root@yisheng-v-m:/home/yisheng/shell# /bin/bash 1.sh hello world