`which` isn't necessarily portable, but `command -v` is an equivalent form. Additionally, the `\'` is not necessary, as it is already quoted by `"`.