Bash Mapfile Builtin Command Help and Examples

1 语法 1.1 选项 1.2 注意事项 1.3 退出状态 2 示例 2.1 使用进程替换 (process substitution) 的 mapfile 3 Process substitution 本文为摘录,原文为: https://www.computerhope.com/unix/bash/mapfile.htm 1 语法 mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback [-c quantum]] [array] 1.1 选项 mapfile 内建命令...

October 19, 2023 · Yang, Ying-chao

google shell style guide | Style guides for Google-originated open-source projects

1 Background 2 Shell Files and Interpreter Invocation 2.1 File Extensions 2.2 SUID/SGID 3 Environment 3.1 STDOUT vs STDERR 4 Comments 4.1 File Header 4.2 Function Comments 4.3 Implementation Comments 4.4 TODO Comments 5 Formatting 5.1 Indentation 5.2 Line Length and Long Strings 5.3 Pipelines 5.4 Loops 5.5 Case statement 5.6 Variable expansion 5.7 Quoting 6 Features and Bugs 6.1 ShellCheck 6.2 Command Substitution 6.3 Test, [ … ], and...

August 17, 2023

Tips of Bash/Zsh

1 展开 Bash 数组 (array) 时候, ${ARRARY[@]} 和 ${ARRARY[*]} 有什么区别? 2 How do you escape characters in heredoc? 2.1 Question 2.2 Answer 3 special expansion: 4 will .bash_profile be sourced when executing scripts? 本文为摘录,原文为: https://unix.stackexchange.com/questions/505949/expanding-only-certain-variables-inside-a-heredoc 1 展开 Bash 数组 (array) 时候, ${ARRARY[@]} 和 ${ARRARY[*]} 有什么区...