Hi

set echo off
set feedback off
set verify off
set heading off
spool test.txt
declare
begin
dbms_output.put_line('hello');
end;

now do cat text.txt

regards
Hrishy