You can now redirect the output of a T-SQL command to a file or pipe it to an external application from within an interactive isql session.
Example 1 Writes the output of the select @@servername command to the file myserver.txt, or overwrites that file if it already exists:
1> select @@servername 2> go > myserver.txt
Example 2 Writes the output of the select @@version command to the new file myserver.txt, or appends it to that file if it already exists:
1> select @@version 2> go >> myserver.txt
Example 3 Pipes the output of the sp_who command to grep and returns the lines that contain the string 'sa':
1> sp_who 2> go | grep sa