Sponsored Content
Top Forums Shell Programming and Scripting Want to show files on web page Post 98311 by vino on Tuesday 7th of February 2006 09:53:40 AM
Old 02-07-2006
Here is a starter script for you... It will generate a sample html web page

You will have to work out the details for further enhancements/improvements...

Code:
#! /bin/ksh

:<<HTML_SAMPLE_TAGS
<HTML>
  <HEAD> 
    <HTML>Sample 1</TITLE>
<BODY>
  <P>Some text goes here</P>
<A href="a link which is relative to this html">text which points to tthe above hreflink</A>
</BODY>
    </HTML>
HTML_SAMPLE_TAGS


PAGE="/path/to/the final/html/file"

function header {
echo "<HTML>
  <HEAD>
    <HTML>"$@"</TITLE>" > "$PAGE"
}

function body {
echo "<BODY>
  <P>"$@"</P>" >> "$PAGE"
}

function hreflink {
echo "<A href=\""$@"\">" >> "$PAGE"
}

function hreftext {
echo "$@</A>" >> "$PAGE"
echo "
">> "$PAGE"

}

function close {
echo "</BODY>
    </HTML>" >> "$PAGE"
}
header "Sample 1"
body "Some text goes here"
hreflink "a link which is relative to this html"
hreftext "text which points to tthe above hreflink"
hreflink "another link which is relative to this html"
hreftext "some other text for the new link"
close

All the links will go into hreflink, the corresponding text into hreftext.

Vino

Last edited by vino; 02-07-2006 at 11:03 AM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Which comand to show the source code on a web page?

Hi folks! I am using MacOsX that runs freeBSD. Could you tell me what comand to type on the Unix Terminal to display on the terminal the source code of a certain web page? I think something like #<comand> http://www.apple.com will display on the terminal's window the html source code... (11 Replies)
Discussion started by: fundidor
11 Replies

2. UNIX for Dummies Questions & Answers

how do i make a web page

hey uhh this is my first post and i was wondering how do i make a web page for like a small business or something anything will help thanks (3 Replies)
Discussion started by: Neil Peart
3 Replies

3. UNIX for Dummies Questions & Answers

Make a Web page

I'm 13 years of age and I am into computers. I am trying to learn how to make a webpage. I could use the help and I would greatly appriciate it. (1 Reply)
Discussion started by: lydia98
1 Replies

4. Shell Programming and Scripting

Printing to a web page

I have a shell script that runs periodic upgrades on machines. I want to print certain echo commands from the shell script onto a webpage. What command in shell should I use for doing this. (1 Reply)
Discussion started by: lassimanji
1 Replies

5. UNIX for Dummies Questions & Answers

Looking for a web page that won't let me in

Hi, I have a project for school using wget and egrep to locate pattern locations on a web page. One of the things we have to do is handle an "access denied" exception. Here is the problem, I can not think of/find any web pages that give me an access denied error to play with, can anyone suggest... (1 Reply)
Discussion started by: njmiano
1 Replies

6. UNIX for Dummies Questions & Answers

List and download web page files

Hello, Does anyone know of a way to list all files related to a single web page and then to download say 4 files at a time simultaneously until the entire web page has been downloaded successfully? I'm essentially trying to mimic a browser. Thanks. (2 Replies)
Discussion started by: shadyuk
2 Replies

7. Shell Programming and Scripting

Show Logs from a server location to a web browser

hey Guys, Am a newbie to Linux and have a probable requirement that might come up pretty soon. I need to understand, how log files and log location can be displayed on a web browser. So that the end user can read the log files and should be able to search for order numbers in the logs. If... (2 Replies)
Discussion started by: ashish_samarth
2 Replies

8. Shell Programming and Scripting

Execute command and show result in web page

Hi everyone, I have two question 1- I want to execute command in shell and after execution result show in a web server. (kind of making UI ) e.g. in shell root ~: show list item1 item2 item(n)in web server in a page draw a table and show those items in itno | name... (1 Reply)
Discussion started by: indeed_1
1 Replies

9. What is on Your Mind?

The Return of the Show Post Page

You may recall we used to have a "Show Post" link in each post that referenced the post and had a link to this post in page. I am going to bring back this feature and and renovate the page: https://www.unix.com/members/1-albums215-picture1013.png So that page has a "Under Renovation"... (1 Reply)
Discussion started by: Neo
1 Replies

10. Post Here to Contact Site Administrators and Moderators

Newbie reports: some posts show only the title and bottom-of-page menu. No text in the middle!

When I try to look at some of the posts (like "Rookie Grandmother"), I see the thread title and the menu at the bottom, but not the text of the post in the middle. I can see ALL of the posts in the Recent menu, but NONE of the others. The screenshot I attached shows the situation. I just... (2 Replies)
Discussion started by: JRWoodward
2 Replies
TSOCKS(1)						      General Commands Manual							 TSOCKS(1)

NAME
tsocks - Shell wrapper to simplify the use of the tsocks(8) library to transparently allow an application to use a SOCKS proxy SYNOPSIS
tsocks [application [application's arguments]] or tsocks [-on|-off] or tsocks DESCRIPTION
tsocks is a wrapper between the tsocks library and the application what you would like to run socksified. OPTIONS
[application [application's arguments]] run the application as specified with the environment (LD_PRELOAD) set such that tsocks(8) will transparently proxy SOCKS connec- tions in that program [-on|-off] this option adds or removes tsocks(8) from the LD_PRELOAD environment variable. When tsocks(8) is in this variable all executed applications are automatically socksified. If you want to use this function, you HAVE to source the shell script from yours, like this: "source /usr/bin/tsocks" or ". /usr/bin/tsocks" Example: ". tsocks -on" -- add the tsocks lib to LD_PRELOAD (don't forget the leading dot!) ". tsocks -off" -- remove the tsocks lib from LD_PRELOAD (don't forget the leading dot!) [-show|-sh] show the current value of the LD_PRELOAD variable <without any argument> create a new shell with LD_PRELOAD including tsocks(8). SEE ALSO
tsocks.conf(5) tsocks(8) AUTHOR
This script was created by Tamas SZERB <toma@rulez.org> for the debian package of tsocks. It (along with this manual page) have since been adapted into the main tsocks project and modified. TSOCKS
TSOCKS(1)
All times are GMT -4. The time now is 05:11 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy