在for语句中使用多个变量

5年以前  |  阅读数:469 次  |  编程语言:Shell 
#!/bin/bash
# multiple variables

for (( a=1, b=10; a<=10; a++,b-- ))
do
    echo "$a - $b"
done

Copyright© 2013-2020

All Rights Reserved 京ICP备2023019179号-8