If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > entire line in a variable

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-25-04, 06:00
amolbc amolbc is offline
Registered User
 
Join Date: Mar 2004
Posts: 7
Red face entire line in a variable

am trying to read a single text file line by line....
i wrote a pretty lengthy shell script only to realize when running that i cannot read a single line entirely
i used
for REC in `cat WAV.dat`
do

done

what i want is REC to have the entire line and not a single field in the line...

now i donot want to go for awk now...otherwise i will have to change to entire script..

so please help me read an entire line into a variable ...
Reply With Quote
  #2 (permalink)  
Old 03-25-04, 08:24
aigles aigles is offline
Registered User
 
Join Date: Jan 2004
Location: Bordeaux, France
Posts: 319
Try this :
Code:
while read REC
do

done < WAV.dat
__________________
Jean-Pierre.
Reply With Quote
  #3 (permalink)  
Old 03-25-04, 09:53
amolbc amolbc is offline
Registered User
 
Join Date: Mar 2004
Posts: 7
Quote:
Originally posted by aigles
Try this :
Code:
while read REC
do

done < WAV.dat
Yeah!

aigles, u are not aigles.... u are an Angel..helping ppl out of misery

thanx wiz!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On