The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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
HTML parsing by PERL avik1983 Shell Programming and Scripting 3 02-23-2007 09:25 AM
perl and html marcpascual Shell Programming and Scripting 8 09-21-2005 07:47 PM
Perl: Variable input via HTML douknownam Shell Programming and Scripting 5 02-13-2005 11:39 PM
Number of html files giuseppe74 UNIX for Dummies Questions & Answers 5 05-20-2002 06:08 AM
Moving .html files while preserving hyperlink integrity? Buddy123 UNIX for Dummies Questions & Answers 1 12-21-2000 03:59 PM

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 10-29-2007
Raynon Raynon is offline
Registered User
  
 

Join Date: Sep 2006
Location: Sg
Posts: 350
Using Perl to add hyperlink to html files

Hi ,

I have written a csh script which will output file named " myoutput.html " displayed below. I am tried to ftp this html file into a local web server so that it can be displayed to public sharing this server and i would want to add a hyperlink to " XX " , " YY " , " ZZ ". Can this be done using perl ? Can anybody show me an example of the code to perform this ?

XX 20 $50
YY 30 $60
ZZ 40 $70
  #2 (permalink)  
Old 10-29-2007
porter porter is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 2,965
It doesn't look like HTML to me.

I thought you would want to generate

Code:
<html>
    <head>
          <title>My webpage</title>
    <head>
    <body>
        <a href="some-url">XX</a> 20 $50<br>
        <a href="some-url">YY</a> 30 $60<br>
        <a href="some-url">ZZ</a> 40 $70<br> 
    </body>
</html>
  #3 (permalink)  
Old 10-29-2007
Raynon Raynon is offline
Registered User
  
 

Join Date: Sep 2006
Location: Sg
Posts: 350
Hi Porter,

Can i use perl to create your HTML code before i ftp ?
I would want to perform everything in my Solaris OS that is

1) generate the .html extension file using csh
2) create hyperlink in the html file ( using perl maybe or html ? )
3) ftp to the server
  #4 (permalink)  
Old 10-29-2007
porter porter is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 2,965
Quote:
Originally Posted by Raynon View Post
Can i use perl to create your HTML code before i ftp ?
Certainly.
  #5 (permalink)  
Old 10-29-2007
Raynon Raynon is offline
Registered User
  
 

Join Date: Sep 2006
Location: Sg
Posts: 350
But Porter,

Can you show me the perl code using this example which is able to create the html and ftp to the server?
I am a novice in this area . Thanks
  #6 (permalink)  
Old 10-29-2007
porter porter is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 2,965
Code:
#!/usr/bin/perl

print "<html>\r\n";
print "\t<head>\r\n";
print "\t\t<title>My webpage</title>\r\n";
print "\t<head>\r\n";
print "\t<body>\r\n";
print "\t\t<a href=\"some-url\">XX</a> 20 \$50<br>\r\n";
print "\t\t<a href=\"some-url\">YY</a> 30 \$60<br>\r\n";
print "\t\t<a href=\"some-url\">ZZ</a> 40 \$70<br>\r\n";
print "\t</body>\r\n";
print "</html>\r\n";
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 08:12 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