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

📄 csubloop.sh

📁 Shall高级编程
💻 SH
字号:
#!/bin/bash# csubloop.sh: Setting a variable to the output of a loop.variable1=`for i in 1 2 3 4 5do  echo -n "$i"                 #  The 'echo' command is criticaldone`                          #+ to command substitution here.echo "variable1 = $variable1"  # variable1 = 12345i=0variable2=`while [ "$i" -lt 10 ]do  echo -n "$i"                 # Again, the necessary 'echo'.  let "i += 1"                 # Increment.done`echo "variable2 = $variable2"  # variable2 = 0123456789#  Demonstrates that it's possible to embed a loop#+ within a variable declaration.exit 0

⌨️ 快捷键说明

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