list=`cat $1`
for val in $list
do
echo $val
done
while read line
do
echo $line
done < test.txt
- 查找文件内容 并赋值变量
a=`grep -i 'versions_ent.environment=' $1`;
for val in $a
do
echo "grep->"$val
done
list=`cat $1`
for val in $list
do
echo $val
done
while read line
do
echo $line
done < test.txt
a=`grep -i 'versions_ent.environment=' $1`;
for val in $a
do
echo "grep->"$val
done
本文标题:shell 读取文件
本文链接:https://www.haomeiwen.com/subject/ehajrktx.html
网友评论