Try this approach:
#!/usr/bin/bash
copen() {
(($# == 1)) && xdg-open "$1" &>/dev/null & disown
}
copen "$1"
Run the script as follows: `./myscript SomePDFfile.pdf`
The `&>/dev/null` is a shorthand for `>/dev/null 2>&1` added in bash >4.
The `copen` function needs a parameter.