The UNIX Forums
"Join the Network of UNIX System Users"


 
Subject: regarding replacement
alarik
Newbie
Rank: 1



UID 46
Digest Posts 0
Credits 0
Posts 48
Reading Access 10
Registered Apr 25, 2007
Status Offline
Post at Jun 13, 2007 10:35 AM  Profile | P.M. 
regarding replacement



regarding replacement



i have two files:

file1:
somedata
<html>
<head>
this is sample statement
......
......
</head>
</html>
somedata

file2:
olga 81 91 b a

rene 82 92 b a
zack 83 93

expextd result:

somedata
<html>
<head>
olga 81 91 b a
rene 82 92 b a
zack 83 93
</head>
</html>


thx in advance,


Top
kapengbarako
Newbie
Rank: 1



UID 212
Digest Posts 0
Credits 0
Posts 44
Reading Access 10
Registered Apr 25, 2007
Status Offline
Post at Jun 13, 2007 10:36 AM  Profile | P.M. 
thanks for your response,but i need following



i have two files:

file1:

somedata
<html>
<head>
this is sample statement
......
......
</head>
</html>
somedata

file2:

olga 81 91 b a
rene 82 92 b a
zack 83 93

expextd result:

file1:

somedata
<html>
<head>
olga 81 91 b a
rene 82 92 b a
zack 83 93
</head>
</html>

my question is how to replace the file2 contents into file1 between the patteren <head> and</head>

thx in advance,
rajx
Top
 

 

All times are GMT, the time now is Jul 31, 2010 03:27 AM

Powered by Discuz! 5.0.0  © 2001-2006 UNIX Forums
Processed in 0.004758 second(s), 8 queries

Clear Cookies - Contact Us - UNIX Help - Archiver - WAP