Results 1 to 2 of 2
I want to fetch data from a table (Filename table.txt)
Table is like
Data_One : 34
Data_two : 45
Data_three :
45, 67
P.S : Values are in next line ...
- 04-25-2011 #1Just Joined!
- Join Date
- Jun 2010
- Posts
- 9
fetch data
I want to fetch data from a table (Filename table.txt)
Table is like
Data_One : 34
Data_two : 45
Data_three :
45, 67
P.S : Values are in next line and I cnat modify the file format
now I wants to store the value 45 and 67 into two variables .
for fetching Data_one value, I used the following command
temp=$(cat table.txt | grep "Data_One" | sed s/[^0-9]*/)
How can I get 45 and 67 into two variables.
Plz give your suggestion
- 05-09-2011 #2
May be try cut ?
var1=`cut -f1 -d','`var2=`cut -f2 -d','`- Lakshmipathi.G
-------------------
FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-------------------


Reply With Quote