in the below code section while path=${path%/*}; do, I won\'t to new a last_val=path for next loop, jugde by path=${path%/*};if [[ last_val == pa
while path=${path%/*}; do
last_val=path
path=${path%/*};if [[ last_val == pa