Hi ppl,
I'm trying to do my first "real'" program in shell using wget,awk and sed. I'm knee deep in books and mans but am a little confused at the moment (arent we all

)
OK, here is my program flow:
wget retrieves a web page from the internet and outputs the file to "file"
I then stip the html tags using sed :
#strip html tags from file
sed -e 's/<[^>]*>//g' file > done
I then remove some other unwanted stuff from the file, convert it to unix format and add blank line every third space. This gives me a file thus:
07:53
FÚTBOL
Fútbol mundial: Emisión 543
08:20
GOLF
Golf: Birdie: Emisión 329
08:45
INFORMATIVO
Noticias CNN+
etc etc
Now starting AWK in my shell script I do:
awk -f ESvar done > bloop
Where ESvar is an AWK script thus :
BEGIN { RS = "" ;FS = "\n";}
{
print $1 $2 $3
}
Works successfully but I need to use the $1 $2 and $3 variables from awk in my main shell script for things such as
sqlinsert = "insert into table (time,title,genre,date) values ($1,$2,$3,$date);"
and write this variable to a file and loop through it to create one big sql file I can then run at my mySQL db to insert the vaules.
I hope this makes (some) sense!
Thanks
BL