Store table contents in csv file

I need to write a script to store the contents of a table in a csv file
I'm using Toad, it's a Oracle database.

Toad can do that for you.
Select schema browser view ==> Right click on table ==> Save as...

Is this enough?

If you are using Toad, then at the left extreme top of your results window, right click, choose Save as -> choose XLS as file format and "," as delimiter.

I actually need to have it in a script, the reason is because I want to do some automated testing, so I'm working with many files etc at a time, I want one script that will make the process faster.

If you want it scripted, use SQL*Plus on the command line, instead of Toad, and run a script like this:

sqlplus -s user/pw@sid << EOD
set colsep ,
set head off
set trimspool
spool /path/to/file.csv
select * from table;
spool off
EOD

Thank you for all you help, one more request please, is it possible to have this in a bash script

---------- Post updated at 07:39 AM ---------- Previous update was at 07:35 AM ----------

I was looking at something along this lines:

#!/bin/bash
sqlstr = <<-'SQL'
select * from celltable > importcell.csv
SQL