linux-tutorial/codes/shell/示例脚本/逻辑控制/在for语句中使用多个变量.sh

8 lines
94 B
Bash
Raw Normal View History

2019-05-10 11:17:57 +08:00
#!/bin/bash
# multiple variables
for (( a=1, b=10; a<=10; a++,b-- ))
do
echo "$a - $b"
done