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
shell script error alias_juju UNIX for Dummies Questions & Answers 2 07-02-2008 01:05 PM
Shell Script Error jazz8146 UNIX for Dummies Questions & Answers 0 04-23-2008 07:38 AM
Shell script run error ksh: not found nz80qy Shell Programming and Scripting 3 03-25-2008 10:57 AM
awk Shell Script error : "Syntax Error : `Split' unexpected Herry UNIX for Dummies Questions & Answers 2 03-17-2008 11:16 AM
error in shell script jalpan.pota UNIX for Dummies Questions & Answers 2 05-18-2007 09:14 AM

 
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
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 11-17-2008
veerumahanthi veerumahanthi is offline
Registered User
  
 

Join Date: Nov 2008
Posts: 1
SHELL SCRIPT error

Hi I am a new member,can any one help me


#!/bin/sh
# 'clear'
for i in $(seq -w 15 37)
do
#echo $i
string1= wget --dns-timeout=0.001 http://napdweb${i}.eao.abn-iad.ea.co.../test/test.jsp;
if [ "$string1" = "$Resolving napdweb${i}.eao.abn-iad.ea.com...failed connection timed out." ];
then
echo "May be napdweb${i}.eao.abn-iad.ea.com...has hung, please restart."
else
echo "Everything is good and fine"
fi
done
~


After the wget command is executed,i assigned that string to another string called string1. so in the next step when that string1 is equal to a particular string as i given in program, it should display a msg as server is down please restart otherwise else part should be displayed.I dont know why my logic is not running can any one solve it plssssssss
 

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 02:41 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