Script for Logfile Inserting into the Database

Here's the problem.

I have a shell script running for every one minute as cronjob that outputs to a log file. I want to be able to take the data from the log file and insert it into a mysql database. The script needs to run at a set period of time and remove the log file data once the insert is complete, without a user having to do anything.

Thanks in Advance in making the Impossible things Possible by your valuable help!!!!!!!!!

You can do the job similar way using cronjob.
Set up the second script to run as cronjob as per the required time interval and do the job of inserting the data into the sql database through this script.

what is that you need help for?

regards,
Ahamed

can you just post me up the way u do it as cronjob!!!

crontab -e #this will open up the crontab file where you need to insert the file which needs to be run at specific time interval

15 * * * * /where/ever/your/script/is

The above script is sceduled to run every 15th minute of an hour. Change it as per your requirement.
man crontab for more details.

regards,
Ahamed

actually this was done dude the thing was like i want to get the information inside a logfile which should be inserted into a mysql database at a particular table

what is stopping you from getting the data inside the log?
Can you paste the code you have tried till now?

regards,
Ahamed

i want to know the process in steps....as i'm new in doing this task

Requirement not clear.

for reading files line by line from the log

while read line
do
echo $line #this will give you lines read
done < file

how do you want to insert into the DB?

regards,
Ahamed