Linux Bash中,一行一行的打印文件

#!/bin/bash
cat file_name | while read line;
do
    echo $line
done;

注意read是关键字,line是var,file_name才是文件名~

Leave a Reply

Your email address will not be published. Required fields are marked *