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
shell send html email Ikon Shell Programming and Scripting 4 09-16-2008 03:03 AM
html withing shell scripts,how?? divzz Shell Programming and Scripting 6 05-28-2008 09:11 AM
Unix Shell Script along with .HTML ronix007 UNIX for Dummies Questions & Answers 3 01-07-2008 09:15 AM
Converting Shell Script to HTML davwel Shell Programming and Scripting 3 10-25-2007 11:25 PM
difference between AIX shell scripting and Unix shell scripting. haroonec Shell Programming and Scripting 2 04-12-2006 09:12 AM

Closed Thread
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 11-10-2008
jrex1983 jrex1983 is offline
Registered User
  
 

Join Date: Nov 2008
Posts: 4
how to use html tag in shell scripting

Hai friends

I have a small doubt..

how can we use html tag in shell scripting

code :
echo "<html>"
echo "<body>"
echo " welcome to peace world "
echo "</body>"
echo "</html>"

output displayed like this:

<html>
<body>
welcome to peace world
</body>
</html>


but i need output in this format,

" hai ".


i saved the file in .sh format

can any body help me..

thanks

rex
  #2 (permalink)  
Old 11-11-2008
danmero danmero is offline Forum Advisor  
  
 

Join Date: Nov 2007
Location: 45.48-73.63
Posts: 1,441

Code:
echo '<html>
<body>
"welcome to peace world".
</body>
</html>'

  #3 (permalink)  
Old 11-11-2008
jrex1983 jrex1983 is offline
Registered User
  
 

Join Date: Nov 2008
Posts: 4
Quote:
Originally Posted by danmero View Post
Code:
echo '<html>
<body>
"welcome to peace world".
</body>
</html>'
hai i am not getting thro this code . in this code we get like this only.

<html>
<body>
"hai"
</body>
</html>


can u give some other suggestion
  #4 (permalink)  
Old 11-14-2008
carlos25 carlos25 is offline
Registered User
  
 

Join Date: Sep 2008
Posts: 10
HTML is a "Hyper Text" display language and can be only used to display text in a formated manner via a web browser. PHP is the most widely used scripting language and can be used on the command line to produce local results or serve the results to a web browser request via the internet/intranet . i.e. format and display a page viewable with a web browser. However, if you want to serve the html up to web clients you will need to do so via a web server.

You can use the code you supplied but you have to display it with a web browser. The web browser will read the tags and display the contents without displaying the tags.

Simply put - scripts are used to perform tasks and commands and the html tags are used to display results in a formatted fashion with a web broweser.
  #5 (permalink)  
Old 11-14-2008
jrex1983 jrex1983 is offline
Registered User
  
 

Join Date: Nov 2008
Posts: 4
can u give some example

hai can u give some example


Quote:
Originally Posted by carlos25 View Post
HTML is a "Hyper Text" display language and can be only used to display text in a formated manner via a web browser. PHP is the most widely used scripting language and can be used on the command line to produce local results or serve the results to a web browser request via the internet/intranet . i.e. format and display a page viewable with a web browser. However, if you want to serve the html up to web clients you will need to do so via a web server.

You can use the code you supplied but you have to display it with a web browser. The web browser will read the tags and display the contents without displaying the tags.

Simply put - scripts are used to perform tasks and commands and the html tags are used to display results in a formatted fashion with a web broweser.
  #6 (permalink)  
Old 11-17-2008
carlos25 carlos25 is offline
Registered User
  
 

Join Date: Sep 2008
Posts: 10
A basic example can be found here PHP in HTML - HTML inside PHP - PHP embed HTML


Code:
<html>
<title>HTML with PHP</title>
<body>
<h1>My Example</h1>

<?php
//your php code here
?>

<b>Here is some more HTML</b>

<?php
//more php code
?>


</body>
</html>

You can remove the php script and generate a html page by using echo or print on each line with a bash or ksh script and then open the doc with a web browser to view the document.
FYI - The php script won't work unless it's on a webserver.

Last edited by carlos25; 11-17-2008 at 09:21 PM..
Closed Thread

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 04:15 AM.


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