📄 ex15.sh
字号:
#!/bin/bash# Naked variablesecho# When is a variable "naked", i.e., lacking the '$' in front?# When it is being assigned, rather than referenced.# Assignmenta=879echo "The value of \"a\" is $a."# Assignment using 'let'let a=16+5echo "The value of \"a\" is now $a."echo# In a 'for' loop (really, a type of disguised assignment):echo -n "Values of \"a\" in the loop are: "for a in 7 8 9 11do echo -n "$a "doneechoecho# In a 'read' statement (also a type of assignment):echo -n "Enter \"a\" "read aecho "The value of \"a\" is now $a."echoexit 0
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -