RHEL-7.2
Factor out all the "type -V" commands
use "rm --" to guard against filenames beginning with "-"