The UNIX and Linux Forums  


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
possible to run script to enter info within a program? lianderthal Shell Programming and Scripting 1 06-09-2005 07:40 PM
I need a script that script extract info from mail meravd Shell Programming and Scripting 1 10-19-2004 12:15 PM
sys info script FastMagister Shell Programming and Scripting 1 06-20-2004 05:29 PM
basic server info antalexi UNIX for Dummies Questions & Answers 2 05-05-2004 12:42 PM
Info Needed in Seting up An apache Web Server on A Sun Sparc with Solaris 8 David Johnston UNIX for Dummies Questions & Answers 1 10-06-2001 09:46 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 02-01-2008
am_yadav am_yadav is offline
Registered User
  
 

Join Date: Jan 2008
Location: Chandigarh,India
Posts: 22
Script to ssh to different server and get some info

Hi Friends,

i am trying to write a script on server MACHINE1 to ssh to server MACHINE2 and fetch some information.

i am using the following command:

ChanCount=`ssh MACHINE2 "disp card all | grep Inserv | grep -v STATE | wc -l"`

The "disp" command works well on MACHINE2 but not working through this command and the output says "disp not found".

Please suggest the workaround.

Thanks,
Am
  #2 (permalink)  
Old 02-01-2008
ennstate ennstate is offline
Registered User
  
 

Join Date: Mar 2007
Location: Chennai
Posts: 222
Quote:
Originally Posted by am_yadav View Post
Hi Friends,

i am trying to write a script on server MACHINE1 to ssh to server MACHINE2 and fetch some information.

i am using the following command:

ChanCount=`ssh MACHINE2 "disp card all | grep Inserv | grep -v STATE | wc -l"`

The "disp" command works well on MACHINE2 but not working through this command and the output says "disp not found".

Please suggest the workaround.

Thanks,
Am
May be the "disp" command is not present or cannot be located in any of the directories listed in the PATH variable on the MACHINE2,if know under which directory its located use full path to the command.

Thanks
Nagarajan G
  #3 (permalink)  
Old 02-01-2008
am_yadav am_yadav is offline
Registered User
  
 

Join Date: Jan 2008
Location: Chandigarh,India
Posts: 22
Thanks a lot Nagarajan. It Worked
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 06:30 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