We can read a file , line by line using shell script,
with the following approach.
FILE="/etc/hosts"
cat $FILE | while read LINE
do
echo " $LINE"
done
Reference: http://bashscript.blogspot.com/2010/05/how-to-read-file-line-by-line-in-shell.html
with the following approach.
FILE="/etc/hosts"
cat $FILE | while read LINE
do
echo " $LINE"
done
Reference: http://bashscript.blogspot.com/2010/05/how-to-read-file-line-by-line-in-shell.html
No comments:
Post a Comment