liinux中读取文件

shell 逐行读取文件

 

#! /bin/ksh
 
 exec 6<./test.txt
 while read -u6 line
 do
  echo 'prompt Creating '${line} >> a.txt
  echo '========================'>> a.txt
  echo '@@'${line} >> a.txt
 done
 exec 6<&-

你可能感兴趣的:(读取文件)