> The Database is called wald_data and the fields are:- > f_name varchar(30) not null, > t_name varchar(120) not null, > sub_p varchar(120) not null, > sub_g varchar(120) not null, > date varchar(30) not null > > The format of the text file is:- > > 10_110.htm > Photo Title: McDonald, Fran > Date: 1897-12 > Subject (photograph): portrait > Subject (geographic): Antigonish > Description: Picture of Woman.
what parsing language or tools do you want to use ? shell script : #!/bin/bash f_name=`grep ".htm" <your_text_file>` t_name=`grep "Photo Title:" <your_text_file> | cut -d":" -f 2` date=`grep "Date:" <your_text_file> | cut -d":" -f 2` sub_p=`grep "(photograph):" <your_text_file> | cut -d":" -f 2` sub_g=`grep "(geographic):" <your_text_file> | cut -d":" -f 2` mysql -e 'insert into wald_data values ("$f_name","$t_name","$sub_p","$sub_g","$date")' -u<user> -p<your_password> DB_NAME -- Let's call it an accidental feature. -- Larry Wall MySQL 3.23.51 : up 32 days, Queries : 354.257 per second (avg). -- Dicky Wahyu Purnomo - System Administrator PT FIRSTWAP : Jl Kapt. Tendean No. 34 - Jakarta Selatan (12790) Phone : +62 21 79199577 - Web : http://1rstwap.com --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php