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()
Use
target=${1%/}
A reference.