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 08-31-2007
sureshg_sampat sureshg_sampat is offline
Registered User
  
 

Join Date: Nov 2006
Location: Czech Republic
Posts: 49
Query related to for i in `cat $TEMP_DIR/country.txt

The file country.txt contains
$ cat country.txt
|ORG MU|
|ORG OM|

WHen in script, I wrote this
for i in `cat $TEMP_DIR/country.txt`

It doesnot read the country file first line followed by next line

Instaed it reads as |ORG in first loop and then reads MU| in next loop

I want the for loop to read the contents as |ORG MU| in 1st loop followed by |ORG OM| in next loop

Please suggest any ideas

Thanks in advance