I have a .body, .script, and .sql that I would like to condense in to a single script but I am not sure how to go about it.
.body contains the e-mail message.
.sql spools the data to a .csv:
The .script runs the .sql, and sends an e-mail with the attached Report.zip:
sqlplus $user/$pass@$db @script.sql
(cat script.body; uuencode Report.zip Report.zip) | mail -s "Report" [email protected] -- -f [email protected]
Is it possible that this (including the SQL) can all be done in a single BASH script?
... sends an e-mail with the attached Report.csv. Your script seems to useReport.zipinstead, not that it makes a difference but you should be careful while posting a question.