shell script的語法 - Linux

Table of Contents

請問,在shell script裡的for迴圈,可以用二個變數嗎?


users=`cat ./username`
pw = `cat ./pass`

for uuu in $users
do
echo $uuu
done

像上面的例子,for迴圈只有一個變數,我可以在for迴圈用二個變數嗎,

然後做到類似

for uuu in $users ppp in $pw
do
echo $uuu $ppp
done

的樣子嗎

--

All Comments