Believe it or not, Virex comes with a command-line utility that allows you to scan files for viruses from the Terminal application (/Applications/Utilities). Virex's utility, vscanx, can be found in /usr/local/vscanx on your system. This program has the same functionality as Virex does, if not more.
Before you can use vscanx, there is one important step you need to take: adding vscanx to the Terminal's command path.