Nested While Loop Bash Linux Script To Put