Home | 简体中文 | 繁体中文 | 杂文 | Github | 知乎专栏 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
知乎专栏

第 22 章 Bash Shell

目录

22.1. bash - GNU Bourne-Again SHell
22.1.1. -n 检查脚本是否有语法错误
22.1.2. -x 显示详细运行过程
22.2. 切换身份
22.3. I/O 重定向
22.3.1. stdout
22.3.2. error 重定向
22.3.3. 使用块记录日志
22.3.4. test - 条件判断命令
22.3.5. tee - read from standard input and write to standard output and files
22.3.6. 创建文件
22.3.7. 快速清空一个文件的内容
22.4. pipes (FIFOs)
22.5. mktemp - create a temporary file or directory 临时目录与文件
22.6. History 命令历史记录
22.6.1. .bash_history
22.6.2. 清理历史记录
22.6.3. .mysql_history
22.7. hash - hash database access method
22.8. prompt
22.9. 变量 variable
22.9.1. 系统变量
22.9.2. 表达式
22.9.3. Internal Environment Variables
22.9.4. set 设置变量
22.9.5. unset 变量销毁
22.9.6. 设置变量默认值
22.9.7. export 设置全局变量
22.9.8. declare
22.9.9. Numerical 数值运算
22.9.10. Strings 字符串操作
22.9.11. Array 数组
22.9.12. read 赋值多个变量
22.9.13. eval
22.9.14. typeset
22.9.15. envsubst - substitutes environment variables in shell format strings
22.10. conditions if and case
22.10.1. if
22.10.2. case
22.11. Loops for, while and until
22.11.1. for
22.11.2. while
22.11.3. until
22.12. Functions
22.12.1. Local variables
22.13. User interfaces
22.13.1. input
22.14. subshell
22.15. Help Commands
22.15.1. man - an interface to the on-line reference manuals
22.16. getconf - Query system configuration variables
22.17. 快捷键
22.17.1. 命令行编辑命令
22.17.2. 重新执行命令快捷键
22.17.3. 终端控制快捷键
22.17.4. Bang (!) 命令
22.18. chsh - change login shell
22.19. 执行程序返回值
22.20. Z Shell
22.20.1. installing Z shell
22.20.2. Oh My ZSH!
22.20.3. Starting file
22.20.4. Prompting
22.20.5. Aliases
22.20.6. History
22.20.7. FAQ
22.21. Berkeley UNIX C shell (csh)
22.21.1.
22.22. KornShell
22.22.1.
22.23. fish shell
22.23.1. 安装 fish shell
22.23.2. 配置 fish
22.23.3. 环境变量
22.24. 有趣的 Shell 应用
22.24.1. Ascii 星球大战电影
22.24.2. 天气预报
22.24.3. htop - interactive process viewer
22.24.4. elinks
22.24.5. chat
22.25. Example
22.25.1. 有趣的Shell
22.25.2. backup
22.25.3. CPU 核心数
22.25.4. Password
22.25.5. processes
22.25.6. Shell 技巧
22.25.7. to convert utf-8 from gb2312 code
22.25.8. 使用内存的百分比
22.25.9. 合并apache被cronlog分割的log文件
22.25.10. Linux 交集 差集 并集

22.1. bash - GNU Bourne-Again SHell

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

			

			
			

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