Home | 简体中文 | 繁体中文 | 杂文 | Github | 知乎专栏 | 51CTO学院 | CSDN程序员研修院 | OSChina 博客 | 腾讯云社区 | 阿里云栖社区 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
知乎专栏多维度架构

第 20 章 Bash Shell

目录

20.1. bash - GNU Bourne-Again SHell
20.1.1. -n 检查脚本是否有语法错误
20.1.2. -x 显示详细运行过程
20.2. 切换身份
20.3. I/O 重定向
20.3.1. stdout
20.3.2. error 重定向
20.3.3. 使用块记录日志
20.3.4. tee - read from standard input and write to standard output and files
20.3.5. 创建文件
20.3.6. 快速清空一个文件的内容
20.4. pipes (FIFOs)
20.5. mktemp - create a temporary file or directory 临时目录与文件
20.6. History 命令历史记录
20.6.1. .bash_history
20.6.2. 清理历史记录
20.6.3. .mysql_history
20.7. hash - hash database access method
20.8. prompt
20.9. 变量 variable
20.9.1. 系统变量
20.9.2. 表达式
20.9.3. Internal Environment Variables
20.9.4. set 设置变量
20.9.5. unset 变量销毁
20.9.6. 设置变量默认值
20.9.7. export 设置全局变量
20.9.8. declare
20.9.9. Numerical 数值运算
20.9.10. Strings 字符串操作
20.9.11. Array 数组
20.9.12. read 赋值多个变量
20.9.13. eval
20.9.14. typeset
20.9.15. envsubst - substitutes environment variables in shell format strings
20.10. conditions if and case
20.10.1. if
20.10.2. case
20.11. Loops for, while and until
20.11.1. for
20.11.2. while
20.11.3. until
20.12. Functions
20.12.1. Local variables
20.13. User interfaces
20.13.1. input
20.14. subshell
20.15. Example
20.15.1. 有趣的Shell
20.15.2. backup
20.15.3. CPU 核心数
20.15.4. Password
20.15.5. processes
20.15.6. Shell 技巧
20.15.7. to convert utf-8 from gb2312 code
20.15.8. 使用内存的百分比
20.15.9. 合并apache被cronlog分割的log文件
20.15.10. Linux 交集 差集 并集

20.1. bash - GNU Bourne-Again SHell

20.1.1. -n 检查脚本是否有语法错误

			

			
			

20.1.2. -x 显示详细运行过程