摘要: Arithmetic Conditionals Operator Meaning -lt Less than -gt Greater than -le Less than or equal to -ge Greater than or equal to -eq Equal to -ne Not eq 阅读全文
posted @ 2021-03-08 13:34 碧水东流至此回 阅读(48) 评论(0) 推荐(0) 编辑
摘要: Typed Variables You can set variable attributes with the declare built-in. * Table 6-1 summarizes the available options with declare. Option Meaning - 阅读全文
posted @ 2021-03-08 11:17 碧水东流至此回 阅读(33) 评论(0) 推荐(0) 编辑
摘要: for|case|select|while and until Command-Line Options and Typed Variables Command-Line Options Typical UNIX commands have the form command [-options]ar 阅读全文
posted @ 2021-03-04 16:29 碧水东流至此回 阅读(51) 评论(1) 推荐(0) 编辑
摘要: Flow Control Exit Status Every UNIX command, whether it comes from source code in C, some other language, or a shell script/function, returns an integ 阅读全文
posted @ 2021-03-04 10:54 碧水东流至此回 阅读(58) 评论(0) 推荐(0) 编辑
摘要: Advanced Examples: pushd and popd Task 4-8 The functions pushd and popd implement a stack of directories that enable you to moveto another directory t 阅读全文
posted @ 2021-03-04 10:10 碧水东流至此回 阅读(36) 评论(0) 推荐(0) 编辑
摘要: Command Substitution The command inside the parentheses is run, and anything the command writes to standard output is returned as the value of the exp 阅读全文
posted @ 2021-03-03 18:01 碧水东流至此回 阅读(56) 评论(0) 推荐(0) 编辑
摘要: Extended Pattern Matching Operator Meaning *(patternlist) Matches zero or more occurrences of the given patterns. +(patternlist) Matches one or more o 阅读全文
posted @ 2021-03-03 11:09 碧水东流至此回 阅读(32) 评论(0) 推荐(0) 编辑
摘要: Length Operator(chapter 4, page[117|99]) There is one remaining operator on variables. It is ${#varname}, which returns the length of the value of the 阅读全文
posted @ 2021-03-03 11:08 碧水东流至此回 阅读(33) 评论(0) 推荐(0) 编辑
摘要: Patterns and Pattern Matching wildcard(通配符) Operator Meaning ${variable#pattern} If the pattern matches the beginning of the variable’s value, delete 阅读全文
posted @ 2021-03-03 10:47 碧水东流至此回 阅读(31) 评论(0) 推荐(0) 编辑
摘要: To define a function, you can use either one of two forms: function functname{ shell commands} or: functname ( ) { shell commands} You can also delete 阅读全文
posted @ 2021-03-02 09:42 碧水东流至此回 阅读(77) 评论(0) 推荐(0) 编辑