\i
Reads and executes input from the specified file.
R
eads and executes input from the specified file.
Note
To see the lines on the screen as they are read, set the variable ECHO to all.Syntax
\i filename
Examples
The Vertica vsql client on Linux supports backquote (backtick) expansion. For example:
-
Set an environment variable to a path that contains scripts you want to run:
$ export MYSCRIPTS=/home/dbadmin/testscripts
-
Issue the vsql command.
$ vsql
-
Use backquote expansion to include the path for running an existing script—for example,
sample.sql
.=> \i `echo $MYSCRIPTS/sample.sql`