-c Command --command Command

-c command --command command runs one command and exits. This is useful in shell scripts.

Use either:

You cannot mix SQL and vsql meta-commands. You can, however, pipe the string into vsql as shown:

echo "\\timing\\\\select * from t" | ../Linux64/bin/vsql
				Timing is on.
				i | c | v
				---+---+---
				(0 rows)
			

Note: If you use double quotes (") with echo, you must double the backslashes (\).