while read line # 消耗stdin
do
echo "$line"
if [ "$loop" -gt 999999 ];then
exit 0;
fi
let "loop +=1"
`echo "line $line " >> /var/log/apache2/log.log`
done
主要是红色行.
将得到echo的字符
root@test# echo "dkdkkd" | /var/test/test.sh "dkjfjfj"
绿字可以使用s*或是$数字来获取