Shell编程
Online Resources: http://tldp.org/LDP/abs/html/... set -e 圆括号 (bar="hello world") echo $bar # 无输出 && $ true && echo "Things went well" Things went well $ false && echo "This will always run" Internal Variableshttp://tldp.org/LDP/abs/html/... Internal Commands1. export: a.sh #!/bin/sh echo "$foo" echo "$bar" b.sh foo="hello world" bar="hello" export foo ./a.sh 等价于==> bar="hello" foo="hello world" ./a.sh 2. source 或 点操作符"." # import utils . scripts/utils.sh source scripts/utils.sh External CommandsIn general,an external command in a script forks off a subprocess,whereas a Bash builtin does not. For this reason,builtins execute more quickly than their external command equivalents.Basic commands: ls,cat,rm,... (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |