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

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 01-23-2006
abzi abzi is offline
Registered User
  
 

Join Date: Nov 2005
Posts: 4
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
  #2 (permalink)  
Old 01-24-2006
abzi abzi is offline
Registered User
  
 

Join Date: Nov 2005
Posts: 4
I solved it... just used ls instead of echo..
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 11:29 AM.


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