BatAli 当前离线
列兵
#!/bin/bash arrline=(); arrchan=(); i=1 while read a do eval $(echo $a|awk -F":" '{for(x=1;x<=NF;x++) {print "arrline["x"]="$x}}'); arrchan[i]=${arrline[2]} let i+=1; done < 111.txt for chan in ${arrchan[@]} do sed -i "/name/ s/\(.*=\).*/\1$chan/" 222.txt done exit复制代码
评分人数
Batcher 当前在线
管理员
#!/bin/bash arrline=(); arrchan=(); i=1 while read a; do eval $(echo $a|awk -F":" '{for(x=1;x<=NF;x++) {print "arrline["x"]=" "\x22" $x "\x22"}}') arrchan[$i]="${arrline[2]}" let i+=1 done < 111.txt for chan in "${arrchan[@]}"; do sed -i "/name/ s/\(.*=\).*/\1$chan/" 222.txt done复制代码
TOP