Shell interview question

More on arrays and strings coding round