ex16.sh
来自「Shall高级编程」· Shell 代码 · 共 24 行
SH
24 行
#!/bin/basha=23 # Simple caseecho $ab=$aecho $b# Now, getting a little bit fancier (command substitution).a=`echo Hello!` # Assigns result of 'echo' command to 'a'echo $a# Note that including an exclamation mark (!) within a#+ command substitution construct #+ will not work from the command line,#+ since this triggers the Bash "history mechanism."# Inside a script, however, the history functions are disabled.a=`ls -l` # Assigns result of 'ls -l' command to 'a'echo $a # Unquoted, however, removes tabs and newlines.echoecho "$a" # The quoted variable preserves whitespace. # (See the chapter on "Quoting.")exit 0
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?