Shell 脚本的组成部分

本文参考自 《Linux Shell命令行及脚本编程实例详解

Shell 脚本的组成部分:
1.Shell 关键字 —— 例如 if…else,for do…done
2.Shell 命令 —— 例如 export,echo,exit,pwd,return
3.Linux 命令 —— 例如 date,rm,mkdir
4.文本处理功能 —— 例如 awk,cut,sed,grep
5.函数 —— 通过函数把一些常用的功能放在一起。例如,/etc/init.d 目录中的大部分或全部系统 Shell 脚本所使用的函数都包含在文件 /etc/init.d/functions 中。
6.控制流语句 —— 例如 if…then…else 或执行重复操作的 Shell 循环。

    原文作者:赵者也
    原文地址: https://www.jianshu.com/p/3321213f668f
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞