The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 06-28-2009
web_developer's Avatar
web_developer web_developer is offline
Registered User
  
 

Join Date: Jun 2009
Location: Durham, NC
Posts: 3
how do you parse 1 line at a time of file1 ie. line(n) each line into new file

File 1
<html>ta da....unique file name I want to give file=>343...</html>
<html>da ta 234 </html>
<html>pa da 542 </html>
and so on...

File 2
343
234
542
and so on, each line in File 1 one also corresponds with each line in File 2

I have tried several grep, sed, while .. read, do, done scripts and to no avail.

i need a ksh script that will do the following
(readORawkOR???) 1 line at a time, >OR?? into its corresponding unique identifier in the HTML code, but the unique identifier in the code is not at the beginning or the ending of the line, its in the middle, I have <html> and </html> at the begining and end of each line..

Any example scripts would be great...

Thanks