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
XPSTOPDF(1)							     XPS Tools							       XPSTOPDF(1)

NAME
xpstopdf - XPS to PDF converter SYNOPSIS
xpstopdf [OPTION...] FILE [OUTPUT FILE] DESCRIPTION
xpstopdf converts XPS documents to PDF format. xpstopdf reads the XPS file, FILE, and writes a PDF file, OUTPUT FILE. If OUTPUT FILE is not specified the output filename will be derived from the OUTPUT FILE filename. OPTIONS
-?, --help Show help options. -d DOCUMENT, --document=DOCUMENT The document inside the XPS file to convert. By default, the first document of the XPS file is used. -f PAGE, --first=PAGE The first page to convert. -l PAGE, --last=PAGE The last page to convert. -o, --odd Convert only odd pages. -e, --even Convert only even pages. -r RESOLUTION, --resolution=RESOLUTION Horizontal and vertical resolution in PPI (Pixels Per Inch). The default is 150 PPI. --rx=RESOLUTION Horizontal resolution in PPI (Pixels Per Inch). The default is 150 PPI. --ry=RESOLUTION Vertical resolution in PPI (Pixels Per Inch). The default is 150 PPI. -x X, --crop-x=X The x-coordinate of the crop area top left corner. -y Y, --crop-y=Y The y-coordinate of the crop area top left corner. -w WIDTH, --crop-width=WIDTH The width of crop area. -h HEIGHT, --crop-height=HEIGHT The height of crop area. --paper-width=WIDTH The paper width. --paper-height=HEIGHT The paper height. --expand Expand pages smaller than the paper to fill the paper. By default, pages are not scaled. --no-shrink Don't scale pages which are larger than the paper. By default, pages larger than the paper are shrunk to fit. --no-center Don't center on the paper pages smaller than the paper (after any scaling). By default, pages smaller than the paper are aligned to the lower-left corner. BUGS
Please send bug reports to https://bugzilla.gnome.org/enter_bug.cgi?product=libgxps. SEE ALSO
xpstojpeg(1) xpstopng(1) xpstops(1) xpstosvg(1) XPS Tools 11/19/2011 XPSTOPDF(1)
All times are GMT -4. The time now is 06:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy