[root@YunWei home]# cat 1.txt
1
2
3
4
5
6
7
8
9
10
[root@YunWei home]# cat 2.txt
a
b
c
d
e
f
g
h
i
j
[root@YunWei home]# cat for.sh
#!/bin/bash
a=(`cat 1.txt`)
b=(`cat 2.txt`)
for ((i=0;i<10;i++))
do
echo ${a[$i]}
echo ${b[$i]}
done
[root@YunWei home]# ./for.sh
1
a
2
b
3
c
4
d
5
e
6
f
7
g
8
h
9
i
10
j
阅读(1074) | 评论(0) | 转发(0) |