Thanks everyone
partially i am doing things with awk/sed and bash commands ofcourse google did helped
#sed -n -e 's/^[ ]*//g' -e 's/\([0-9a-zA-Z\.]*\) */\1 /g' -e 10p -e 15p -e 23p nic.htm > nic.txt
then i tried #perl -ne 'print;' *.txt > all.csv, but the result was not comfortable, then i tried with
#for file in *.txt; do cat "$file"; echo; done > newfile.csv
now .csv or .txt file gives me the result in readable format
from this text file, need to send it to database
DISTRICT : ZUNHEBOTO STATE : ABC
02/02 03/02 04/02 05/02 06/02
speed 004 002 004 004 004... next line will be next paragraph
DISTRICT : YUNHEBOOT STATE : EFG
02/02 03/02 04/02 05/02 06/02
speed 004 002 004 004 004
is the result when i do cat of the same, in db i have created table and fields are STATE, District,date, speed
how to import it to db
perl -MCPAN -e shell
and did the installation of HTML::PArser, for mysql what else i needto install here
| [reply] [d/l] [select] |
what exactly are you trying to achieve with
perl -ne 'print;' *.txt > all.csv
or
for file in *.txt; do cat "$file"; echo; done > newfile.csv
???
Those are a bit pointless, just concatenating files into another file, same as just doing
cat *.txt > newfile.txt
And these are not magically creating csv format for you - it's just the same text as in the input files.
No idea what you mean with "how to import it to db perl -MCPAN -e shell"???
| [reply] [d/l] [select] |
<code> true tospo >/code>
taking time to learn things, might be a kid's level code i did.
| [reply] |