Computing.Net > Forums > Unix > read input file variables

read input file variables

Reply to Message Icon

Original Message
Name: Robert Pearson
Date: September 4, 2003 at 08:05:40 Pacific
Subject: read input file variables
OS: Mandrake 7.2
CPU/Ram: 400mhz / 128
Comment:

I need to read a specific part of an input file and assign the data as variables until it reaches the "END". So, for captain coke, I need rum, 2, coke, and 4 as seperate variables.

I realize that I should probably be doing this in MySQL or other DB, but I am trying to keep from getting extremely overwhelmed at this point.

0001 captain coke
rum 2
coke 4
END
0002 dirty martini
vodka 3
olive_juice .25
vermouth .25
END
0003 vodka sour
vodka 2
sour 4
END


Report Offensive Message For Removal








Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: read input file variables

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




How often do you use Computing.Net?

Every Day
Once a Week
Once a Month
This Is My First Time!


View Results

Poll Finishes In 4 Days.
Discuss in The Lounge