[prog] assigning variables in sh

aec brat at magma.ca
Wed Jan 12 09:59:54 EST 2005


On Tue, Jan 11, 2005 at 03:13:14PM -0500, Tim King wrote:
 
> This might be useful if you need to access an item in the list given an 
> index into the list. At this point, I'd start considering Perl instead 
> of sh, however.
> 

Thanks for the responses, Conor, I did read the reference 
you linked to and managed to make the script work using
two arrays and with bash instead of sh.  :P Thanks! 

In the spirit of "less is more" I then re did the script using
the methods Tim and Almut suggested. This also works fine. 

Tim, perl I have absolutely zero knowledge of outside of simple 
one shot search and replace commands, so it wasnt really an
option.

All your answers have been copied to a file for future reference
as gain confidence in my script-fu, so I thank you all for that.

-- 
Angelina Carlton


More information about the Programming mailing list