shell中逐行处理文件下面的代码展示了如何逐行处理文件?#!/bin/bashINFILE$1OUTFILE$2#empty out file$
shell中逐行处理文件
下面的代码展示了如何逐行处理文件
?
#!/bin/bash
INFILE=$1
OUTFILE=$2
#empty out file
>$OUTFILE
#redirection in file at the bottom
while read line; do
??? echo $line >> $OUTFILE
done < $INFILE
