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
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|