UNIX command-line redirection

The UNIX redirection symbols, “ <” and “>”, provide a similar mechanism to the -i and -o options, as follows:

isql -Usa < input > output

You can direct isql to take input from the terminal, as shown in this example:

isql -Usa -Ppassword -Sserver_name << EOF > output
use pubs2
go
select * from table
go
EOF

“<<EOF” instructs isql to take input from the terminal up to the string “EOF.” You can replace “EOF” with any character string. Similarly, the following example signals the end of input with Ctrl-d:

isql -Usa << > output