Need shell script to extract data from oracle database

shell script

What extract, from what table?

need to extract table

You need to get all of the information in a table, into a file, then ftp it somewhere.
I hope this is not an important job thing....

var='SET HEAD OFF
SET LINES 512
SET FEED OFF
SPOOL t.dat
SELECT * FROM TABLE;
SPOOL OFF
EXIT;
' | sqlplus -s username/password
# remove trailing spaces
sed 's/ $//s' t.txt > newfile.txt
echo "
open remotenodename
USER username password
bin 
put newfile.txt
bye 
" |  ftp -n 

thanx jim