⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ex71b.sh

📁 Shall高级编程
💻 SH
字号:
#!/bin/bash# Another 'cat' here document, using parameter substitution.# Try it with no command line parameters,   ./scriptname# Try it with one command line parameter,   ./scriptname Mortimer# Try it with one two-word quoted command line parameter,#                           ./scriptname "Mortimer Jones"CMDLINEPARAM=1     #  Expect at least command line parameter.if [ $# -ge $CMDLINEPARAM ]then  NAME=$1          #  If more than one command line param,                   #+ then just take the first.else  NAME="John Doe"  #  Default, if no command line parameter.fi  RESPONDENT="the author of this fine script"    cat <<EndofmessageHello, there, $NAME.Greetings to you, $NAME, from $RESPONDENT.# This comment shows up in the output (why?).Endofmessage# Note that the blank lines show up in the output.# So does the "comment".exit 0

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -