I have some paths like so:
/dir
/dir//
/dir///
/path/to/dir
/path/to/dir/
/path/to/dir///
/path/to/dir/////////
I want to make it clearer using bash. I want to remove all / characters at the end of path and having:
/path/to/dir or /dir without / at the end.
 
     
    