08-23-06 12:35 AM
On 2006-08-22, Mark Smith wrote:
> Hi everyone. I am a unix newbie, so I apologize for the simple question.
I
> have a simple sql script, say db_query.sql, which runs a select against on
e
> of our Oracle databases. How do I write a unix script which will kick off
> the sql script and spool the output to a datestamped file? Thanks a lot i
n
> advance.
file=db_query_$(date +%Y-%m-%d.%H.%M.%S) ## adjust format to taste
db_query.sql > "$file"
--
Chris F.A. Johnson, author | <http://cfaj.freeshell.org>
Shell Scripting Recipes: | My code in this post, if any,
A Problem-Solution Approach | is released under the
2005, Apress | GNU General Public Licence
[ Post a follow-up to this message ]
|