Shell Programming - File reading method

#/bin/bash
while read line
do
   echo $line
done < a.txt

 Segmentation data with awk

  1 while read line
  2 do
  3 echo $line
  4 echo|awk '{print substr("'${line}'",2)}'
  5 done < a.text

 

Guess you like

Origin www.cnblogs.com/yunshenbuzhichu/p/11348708.html