The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to auto update html page RohitKJ Web Programming, Web 2.0 and Mashups 2 07-30-2009 11:21 AM
HTML file in the mailbody Swapna173 UNIX for Dummies Questions & Answers 3 08-26-2008 12:31 PM
help with splitting a html file up jeroen234 Shell Programming and Scripting 3 06-22-2008 04:26 AM
How do I extract text only from html file without HTML tag los111 UNIX for Dummies Questions & Answers 4 11-28-2007 04:40 AM
Flat File to HTML randerson UNIX for Dummies Questions & Answers 2 02-09-2007 10:37 AM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-26-2009
dave_nithis dave_nithis is offline
Registered User
  
 

Join Date: Sep 2007
Posts: 17
HTML file update!!!

Hello all,

Code:
Login.html
<html>
<head>
<title></title>
</head>
<body>
<div class="MainColumn">
    	<h1>Login</h1>
					<p>Add text here!!
					</p>
	  	</div>
</body>
</html>

message.txt

Code:
Please visit after one hour!!!

Now I want to replace the contents inside <div> tag ie. "Add text here" with the contents inside message.txt so that the updated html file looks like this below:

Code:
<html>
<head>
<title></title>
</head>
<body>
<div class="MainColumn">
    	<h1>Login</h1>
		<p>
Please visit after one hour!!!</p>
	  	</div>
</body>
</html>

Can we do this using sed or awk?Can anyone help me on this?

Last edited by dave_nithis; 08-26-2009 at 09:09 AM..
  #2 (permalink)  
Old 08-26-2009
Neo's Avatar
Neo Neo is offline Forum Staff  
Administrator
  
 

Join Date: Sep 2000
Location: Asia Pacific
Posts: 6,825
To keep the forums high quality for all users, please take the time to format your posts correctly.

First of all, use Code Tags when you post any code or data samples so others can easily read your code. You can easily do this by highlighting your code and then clicking on the # in the editing menu. (You can also type code tags [code] and [/code] by hand.)

Second, avoid adding color or different fonts and font size to your posts. Selective use of color to highlight a single word or phrase can be useful at times, but using color, in general, makes the forums harder to read, especially bright colors like red.

Third, be careful when you cut-and-paste, edit any odd characters and make sure all links are working property.

Thank You.

The UNIX and Linux Forums
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 09:18 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0