Blog Archive for November 5, 2018

Finding string in BASH array

November 5, 2018

I had a need to go through an array variable in bash and see if certain strings were present in the specified order. The existing code looked for values at specific array indexes, but this was deemed too fragile. The fix was to make sure that the strings were present ...