The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 11-17-2008
pinkgladiator pinkgladiator is offline
Registered User
  
 

Join Date: Oct 2008
Posts: 17
Can't read the last line

Hi there,

I found a script that supposed to read a file line by line, but it skips the last line, any suggestions?

exec<$fname
value=0
while read line
do
value=`expr $value + 1`;
echo "line is: $value, email is: $line";
done

Thanks!