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
cronjob prob rahul123_libra UNIX for Dummies Questions & Answers 3 01-11-2006 04:18 AM
memory prob vjm AIX 1 09-27-2005 06:38 AM
grep prob vivekshankar UNIX for Dummies Questions & Answers 1 05-23-2005 12:25 PM
TAR prob - Guru's please help budrito UNIX for Advanced & Expert Users 3 01-20-2005 10:15 PM
prob dreams5617 Shell Programming and Scripting 1 12-04-2004 11:31 PM

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

Join Date: Nov 2005
Posts: 4
Stumble this Post!
prob with ssh

I am executing this on say host1

export dn=/home/abhi
export fn=file\"*\"
file_path=$dn/$fn
set -A files $(ssh host2 "eval echo $file_path")
echo files= ${files[*]}

So the purpose is to store in array "files" .. the o/p of cmd [echo /home/abhi/file*] executed in host2...

this script works fine if the files r found in host2...
however if it is not found in host2..
the array "files" stores the filenames matched in host1!!

y is it so??

i dont want this to happen.. pls suggest
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 01-23-2006
Registered User
 

Join Date: Nov 2005
Posts: 4
Stumble this Post!
I solved it... just used ls instead of echo..
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 04:55 AM.


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