2008年7月29日 星期二

3 methods to read text file line by line as variable in shell script of Unix

1.

while read var
do
..$var..
done < FILE

2.

cat FILE |
while read var
do
..$var..
done

3.

for var in `cat FILE`
do
..$var..
done

沒有留言: