2011-08-09, 09:50(-04), Steven W. Orr:
[...]
> *) To remove the trailing slashes, instead of
>
>              while [[ $file == */ ]]
>              do
>                  file=${file%/}
>              done
>
>              file=${file##*/}    # file name
>
> just say
>           file="${file%${file##*[!/]}}"
[...]

            file=${file%"${file##*[!/]}"}

Same problem with "/" being changed to "" though.

-- 
Stephane

Reply via email to