I am trying to pass values from a ruby hash to a bash script.. What would be the best way to do it? The size and key/value pairs in ruby are always different..
so if I want something like..
hsh = {"key1"=>"value1", "key2"=>"value2"}
%x[sh script.sh #{hsh}]
What would I need on the bash side?
EDIT: If the hash on ruby side won't work, I can use another data structure, what I care about is that the size of the container (hash/ array) will be always different..
EDIT2: By "care about the size" I mean that the hash/ array will have different number of elements every time.. . sorry for unclarity