Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004
    Posts
    7

    Red face Unanswered: 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 ...

  2. #2
    Join Date
    Jan 2004
    Location
    Bordeaux, France
    Posts
    320
    Try this :
    Code:
    while read REC
    do
    
    done < WAV.dat
    Jean-Pierre.

  3. #3
    Join Date
    Mar 2004
    Posts
    7
    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!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •