linux循环处理文件

  1 #!/bin/sh
  2
  3 touch update.sql
  4 cat /home/work/liuchaoqun01/userid.txt | while read line
  5 do
  6     echo "update recmpromotion set materialstyle='2,3' where userid=${line};" >> update.sql
  7 done
  8
~

你可能感兴趣的:(linux循环处理文件)