Bash auto completion appends a / at the end of a directory name. How I can strip this off from a positional parameter?
#!/bin/sh target=$1 function backup()
I think better solution to canonize paths is realpath $path or with -m option if it doesn't exist. This solution automaticaly removes unnecessary slashes and adds pwd
realpath $path
-m