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

第 2 章 Bash Shell

目录

2.1. bash - GNU Bourne-Again SHell
2.1.1. -n 检查脚本是否有语法错误
2.1.2. -x 显示详细运行过程
2.2. 切换身份
2.3. I/O 重定向
2.3.1. stdout
2.3.2. error 重定向
2.3.3. 使用块记录日志
2.3.4. tee - read from standard input and write to standard output and files
2.3.5. 创建文件
2.3.6. 快速清空一个文件的内容
2.4. pipes (FIFOs)
2.5. mktemp - create a temporary file or directory 临时目录与文件
2.6. History 命令历史记录
2.6.1. .bash_history
2.6.2. 清理历史记录
2.6.3. .mysql_history
2.7. hash - hash database access method
2.8. prompt
2.9. 变量 variable
2.9.1. 系统变量
2.9.2. 表达式
2.9.3. Internal Environment Variables
2.9.4. set 设置变量
2.9.5. unset 变量销毁
2.9.6. 设置变量默认值
2.9.7. export 设置全局变量
2.9.8. declare
2.9.9. Numerical 数值运算
2.9.10. Strings 字符串操作
2.9.11. Array 数组
2.9.12. read 赋值多个变量
2.9.13. eval
2.9.14. typeset
2.9.15. envsubst - substitutes environment variables in shell format strings
2.10. conditions if and case
2.10.1. if
2.10.2. case
2.11. Loops for, while and until
2.11.1. for
2.11.2. while
2.11.3. until
2.12. Functions
2.12.1. Local variables
2.13. User interfaces
2.13.1. input
2.14. subshell
2.15. Example
2.15.1. 有趣的Shell
2.15.2. backup
2.15.3. CPU 核心数
2.15.4. Password
2.15.5. processes
2.15.6. Shell 技巧
2.15.7. to convert utf-8 from gb2312 code
2.15.8. 使用内存的百分比
2.15.9. 合并apache被cronlog分割的log文件
2.15.10. Linux 交集 差集 并集

2.1. bash - GNU Bourne-Again SHell

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

			

			
			

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