shell编程——使用管道的while循环无法将变量的值传出来
# 问题描述:实用类似ls | find *.c | while read line,后循环中的变量的值传不出来实例:#!/bin/bashcount=0ls | find f* | while read linedo if [ -f $line ]; then count=$[$count+1] echo count fidone...