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

📄 ex78.sh

📁 一本完整的描述Unix Shell 编程的工具书的所有范例
💻 SH
字号:
#!/bin/bash# Indirect variable referencing.# This has a few of the attributes of references in C++.a=letter_of_alphabetletter_of_alphabet=zecho "a = $a"           # Direct reference.echo "Now a = ${!a}"    # Indirect reference.# The ${!variable} notation is greatly superior to the old "eval var1=\$$var2"echot=table_cell_3table_cell_3=24echo "t = ${!t}"                      # t = 24table_cell_3=387echo "Value of t changed to ${!t}"    # 387#  This is useful for referencing members of an array or table,#+ or for simulating a multi-dimensional array.#  An indexing option (analogous to pointer arithmetic)#+ would have been nice. Sigh.exit 0

⌨️ 快捷键说明

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