Hi,
I want to read a file whic is a data file with 3 fields and look for a perticular pattern and insert that record in to the data base.
I'm trying like this it is not workin please some one help me
for line in `cat file.out`;
do
Name="echo \$line | awk '{print $2}'"
If ( Name -eq val)
then
<insert code> val table
done
anbu23
April 13, 2010, 3:46pm
2
while read first Name third
do
If ( Name -eq val)
then
<insert code> val table
done < file.out
Hi Anbu,
Thanks for your reply, this is not working
I have data file
which have three fields
date
value
name
what I want to do is looking into the each line of the file if name of the file is equal to
name1 insert that record into the name1 table...if the name is name2 insert that record into name2 table....name3 record into name3 table...ect
Please let help me out.
thanks
sekhar
anbu23
April 13, 2010, 4:46pm
4
I just showed you way to read from the file. did you modify If statement and insert statement to get desired result?