Sponsored Content
Operating Systems AIX how to browse a web site using script Post 302140638 by kirantalla on Monday 15th of October 2007 03:56:25 AM
Old 10-15-2007
thank you guys,

but the issue is i am workin on aix machine and i dont have wget tools installed. and installin wget is not an option. i am pasting my script here .. plz have a look at it ..

Code:
WEBSERVER=aix85
WEBPORT=9088
URLDIR=/DmMethods/servlet/DoMethod
TOFILE=result.txt
echo "before telnet"
telnet $WEBSERVER $WEBPORT |&   # Open pipe to web server
echo "After telnet"
IFS=~
read -p HEAD1 2>/dev/null                    # Ignore telnet headers
read -p HEAD1 2>/dev/null
read -p HEAD1 2>/dev/null
print -p "GET $URLDIR HTTP /1.1" 2>/dev/null    # Send HTTP request to server
print -p "" 2>/dev/null
read -p LINE 2>/dev/null
echo ${LINE}
if [ "${LINE}" != "HTTP/1.0 200 OK" -a "${LINE}" != "HTTP/1.1 200 OK" ]; then
  echo "ERROR: Invalid response from Web Server: ${LINE}"
  exit 8
fi
while [ "${LINE}" != "" ]                    # Skip HTTP Headers
do
  read -p LINE 2>/dev/null
done
while read -p LINE 2>/dev/null               # Process web page contents
do
  echo "${LINE}" >> result1.txt
done

 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Web site setup

Hi, I have a m/c loaded with redhat linux, static IP address and this m/c intern connected to the internet thro leaseline. Now i need to setup a company website has www.abc.xyz.com. What necessary configuration i need to do so that others can view our website. Thanks Bache Gowda (5 Replies)
Discussion started by: bache_gowda
5 Replies

2. UNIX for Dummies Questions & Answers

Web site mirroring

I have a unix server running RedHat Linux 9.0. I want to mirror my site on a different server with the same configuration so if the main server goes down, the other server will take over. How is this best accomplished? (1 Reply)
Discussion started by: wvmlt
1 Replies

3. UNIX for Dummies Questions & Answers

Web Site Creation - testing .*pl etc....

Hiya All, How can I test my PERL Scripts whilst making my web site? I'm hoping there is some software out there that emulates a Web Server - without all the hassle of my building/setting up a Web Server from Stratch (Never done anything like that before - my next big project! 8) ) ... (7 Replies)
Discussion started by: marty 600
7 Replies

4. AIX

intranet web site

hello I would like to create an internal web site, but how do i make it with Aix ? I must to install apache and send my http pages in the declared repertory ? There are some configuration files to modify ?? thank you (2 Replies)
Discussion started by: pascalbout
2 Replies

5. Shell Programming and Scripting

I need help in creating my first web site?

I have always wanted to create my own site, I've only had one class about the basics in creating web pages but know i would like to get into more and more detailed info about doing so anyone with alot of experience please help me out.:b: (0 Replies)
Discussion started by: kprescod4158
0 Replies

6. UNIX for Dummies Questions & Answers

Browse Web pages through command line

Is there any way to browse web pages while on the command line? I know wget can download pages, but I was wondering if there was an option other than that. (2 Replies)
Discussion started by: vroomlicious
2 Replies

7. Web Development

Web Site Performance Issue

Hi All, I am currently managing a web site. I find that during the peak time period,ie,between 1300hrs to 2100hrs everyday,the response slows down whenever i access the applications hosted by the server.However when i try to access the static content in the web server,it loads quickly. The... (2 Replies)
Discussion started by: Hari_Ganesh
2 Replies

8. Shell Programming and Scripting

How to block first bash script until second bash script script launches web server/site?

I'm new to utilities like socat and netcat and I'm not clear if they will do what I need. I have a "compileDeployStartWebServer.sh" script and a "StartBrowser.sh" script that are started by emacs/elisp at the same time in two different processes. I'm using Cygwin bash on Windows 10. My... (3 Replies)
Discussion started by: siegfried
3 Replies
GIT-INSTAWEB(1) 						    Git Manual							   GIT-INSTAWEB(1)

NAME
git-instaweb - Instantly browse your working repository in gitweb SYNOPSIS
git instaweb [--local] [--httpd=<httpd>] [--port=<port>] [--browser=<browser>] git instaweb [--start] [--stop] [--restart] DESCRIPTION
A simple script to set up gitweb and a web server for browsing the local repository. OPTIONS
-l, --local Only bind the web server to the local IP (127.0.0.1). -d, --httpd The HTTP daemon command-line that will be executed. Command-line options may be specified here, and the configuration file will be added at the end of the command-line. Currently apache2, lighttpd, mongoose, plackup and webrick are supported. (Default: lighttpd) -m, --module-path The module path (only needed if httpd is Apache). (Default: /usr/lib/apache2/modules) -p, --port The port number to bind the httpd to. (Default: 1234) -b, --browser The web browser that should be used to view the gitweb page. This will be passed to the git web--browse helper script along with the URL of the gitweb instance. See git-web--browse(1) for more information about this. If the script fails, the URL will be printed to stdout. start, --start Start the httpd instance and exit. Regenerate configuration files as necessary for spawning a new instance. stop, --stop Stop the httpd instance and exit. This does not generate any of the configuration files for spawning a new instance, nor does it close the browser. restart, --restart Restart the httpd instance and exit. Regenerate configuration files as necessary for spawning a new instance. CONFIGURATION
You may specify configuration in your .git/config [instaweb] local = true httpd = apache2 -f port = 4321 browser = konqueror modulepath = /usr/lib/apache2/modules If the configuration variable instaweb.browser is not set, web.browser will be used instead if it is defined. See git-web--browse(1) for more information about this. SEE ALSO
gitweb(1) GIT
Part of the git(1) suite Git 1.8.3.1 06/10/2014 GIT-INSTAWEB(1)
All times are GMT -4. The time now is 06:25 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy