##I want to print the updated array at the end but as it\'s inside the while loop(sub-shell), i am not able to send it outside not able to pass the updated array outside of