I did the change but i still have only the first element displaying.  I must
say that i m using ssh to call script2 on remote server so maybe it is the
problem :

script1

ssh [EMAIL PROTECTED] script2 -f [EMAIL PROTECTED] -d [EMAIL PROTECTED]

and on script2 it only echoes the first element of both arrays.


Chet Ramey wrote:
> 
> Dolphin06 wrote:
>> Hello,
>> So how can i pass the entire array, i m new to shell scripting so i do
>> not
>> really understand when you talk about unsubscripted word expansion
> 
> Since programs only take a list of strings as arguments, you have to
> expand
> the array to a list of values.  The "[EMAIL PROTECTED]" expansion can do that.
> Expanding an array variable without using a subscript (${array} as opposed
> to ${array[subscript]}) expands to the first element.
> 
> Chet
> 
> -- 
> ``The lyf so short, the craft so long to lerne.'' - Chaucer
> 
> Chet Ramey, ITS, CWRU    [EMAIL PROTECTED]   
> http://cnswww.cns.cwru.edu/~chet/
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/passing-array-to-command-line-argument.-tp20914576p20916101.html
Sent from the Gnu - Bash mailing list archive at Nabble.com.



Reply via email to