menaging files 
Author Message
 menaging files

Hi,

I am a real starter with the scripts. I have learned somethings so far.
But I couldn't succeed what I aimed yet:

I have several html files. I would like to extract some of the lines
from these files and write them in to one output file in a row. Some of
the lines are lie between <BLOCKQUOTE> and </BLOCKQUOTE> in certain
files and some of the lines are just the last half of certain files.

Anybody have any idea?

huseyin

--
-----------------------------------------------------------------------
Huseyin Ozdemir                         phone: 31-(0)53-489-2473
Technische Stromingsleer                fax: 31-(0)53-489-3695

P.O. Box 217, 7500 AE Enschede, NL    
http://www.*-*-*.com/ ~huseyin
-----------------------------------------------------------------------



Fri, 01 Aug 2003 22:27:30 GMT  
 menaging files

Quote:

> Hi,

> I am a real starter with the scripts. I have learned somethings so far.
> But I couldn't succeed what I aimed yet:

> I have several html files. I would like to extract some of the lines
> from these files and write them in to one output file in a row. Some of
> the lines are lie between <BLOCKQUOTE> and </BLOCKQUOTE> in certain
> files and some of the lines are just the last half of certain files.

> Anybody have any idea?

> huseyin

This construct will match and thereby print all lines between
the two strings:

/<BLOCKQUOTE>/,/</BLOCKQUOTE>/ { print }

To print the last half, do you mean linenumberwise?
If you know the number of lines, you can simply use

NR > 500 { print }

which will print all lines starting from line 501.
If there is a line that you can search for, then the first
example can be used:

/<BLOCKQUOTE>/,/ERTYBERTTDGSDF/ { print }

The second pattern will not match, so awk will continue
to print all lines following <BLOCKQUOTE>.

Bo



Sat, 02 Aug 2003 02:16:03 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. File Conversion with File Manager on Huge files

2. DOS File Lookup - just the file name, not the path AND file name

3. How can I know the .EXE file name, file date, file size

4. files, temp files, and file-like objects

5. (VA 4.02b) using long file names for Envy file attachments

6. Comparing 2 files to create a third file

7. searching one file using the contents of another file

8. Parsing CSV file outputting desired information into multiple unique files

9. Substituting :: for __ in every htm file, and rename htlml file

10. newbie would like to break input file and output to separate files

11. Merge selected columns from two different files into another file

12. Reading from input file writing to output file

 

 
Powered by phpBB® Forum Software