Put double quotes around “$2” like so: libreoffice$Rev --$1 "$2"
The shell does word splitting on the values substituted for the parameters. By enclosing the parameter in quotes you’re telling the shell not to split it. Do not use single quotes. Single quotes not only stop word splitting, they also inhibit parameter substitution. If you use single quotes, a literal ‘$2’ would be given to libreoffice as the file name.
To add to the previous comment, you should get into the habit of always double-quoting variables unless you are certain that there aren’t, and never will be, spaces or other special characters.
So, your command line should look like this:
libreoffice"$Rev" --"$1" "$2"
In your case, you are certain that $Rev doesn’t contain a space, and probably never will. I’m guessing that you are also certain that $1 doesn’t contain a space. Therefore, you could use: