3 methods for shell to read files line by line
#!/bin/bash
#set -x
for line in `cat /root/shizonghao/1.sh`
do
echo $line
done
#!/bin/bash
while read line
do
echo $line
done < cat /root/shizonghao/1.sh
#!/bin/bash
cat /root/shizonghao/1.sh | while read line
do
echo $line
done