I am having a question.
Is it posible to compare elements of 2 different arrays?
For example I got
Array 1 | Array 2
123_abc | 123_bcd
123_bcd | 234_bcd
234_abc | 567_abc
234_bcd | 123_abc
than the match is
123_abc & 234_bcd and non of the others.
So how can I get this done?
to compare it?
yea with if statement but dont know how to get the compare on a whole aray.
I get if [ ${array1[0]} = ${array2[0]} ]
But that isnt what I need.
more like wild card all of array 2 to see if the words are a match.
Sorry I always sound so chaotic but I hope you people understand.
Thanx in advance!!!
You say you want to compare arrays but we need an idea on what you want to compare. Usually when comparing you're comparing with a pattern. i.e. does pattern 1 match pattern 2. Maybe you're wanting to combine the array elements after matching them with a pattern, and if so, what would be the pattern or rule you would use to compare the elements? After we know that then we can construct a routine that can combine them together.