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



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
read a file line by line in ksh chella Shell Programming and Scripting 3 08-29-2008 01:57 AM
query on how to search for a line and read 4th word from that line jaggesh UNIX for Dummies Questions & Answers 4 07-01-2008 10:21 PM
Read logline line by line with awk/sed dejavu88 Shell Programming and Scripting 7 05-26-2008 08:44 PM
read the file line by line kittusri9 Shell Programming and Scripting 3 04-24-2008 08:26 AM
How to read from a file line by line and do stuff spaceship Shell Programming and Scripting 4 03-17-2005 09:47 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rating: Thread Rating: 1 votes, 2.00 average. Display Modes
Prev Previous Post   Next Post Next
  #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!
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 05:09 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0