For rebuilding the index in bash arrays you need to reinitialize array again after the unset operation. If this not be done you will get empty value instead of the expected result. Definitely, bash not for complicated things.

Sign in to participate in the conversation

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!