#!/bin/bash
for str in 'this is a string' 'she is beautiful girl' 'hello,world'
do
echo $str
done
输出结果:
this is a string
she is beautiful girl
hello,world
#!/bin/bash
for str in 'this is a string' 'she is beautiful girl' 'hello,world'
do
echo $str
done
输出结果:
this is a string
she is beautiful girl
hello,world
shell 单个循环多个变量
#!/bin/shtest(){ RetVal=0 cat 1.log | while read line do if[ "$line" == "2" ] th
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M