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 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 03:40 PM
I need a script that script extract info from mail meravd Shell Programming and Scripting 1 10-19-2004 08:15 AM
sys info script FastMagister Shell Programming and Scripting 1 06-20-2004 01:29 PM
basic server info antalexi UNIX for Dummies Questions & Answers 2 05-05-2004 08:42 AM
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 05:46 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-01-2008
Registered User
 

Join Date: Jan 2008
Location: Chandigarh,India
Posts: 22
Stumble this Post!
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
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 02-01-2008
Registered User
 

Join Date: Mar 2007
Location: Chennai
Posts: 222
Stumble this Post!
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
Reply With Quote
  #3 (permalink)  
Old 02-01-2008
Registered User
 

Join Date: Jan 2008
Location: Chandigarh,India
Posts: 22
Stumble this Post!
Thanks a lot Nagarajan. It Worked
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 11:16 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0