Email sql-plus output as csv from Linux

This script can be used for sending sql output via email in CSV format as attachment.

#!/bin/ksh
# ————————————————————————-
# Script Name :
# Author : Hans Schoonen
# Version : 1.0
# ————————————————————————-

SetEnv()
{
NLS_LANG=American_America.UTF8 ; export NLS_LANG
ORACLE_HOME=[YOUR ORACLE HOME DIR] ; export ORACLE_HOME
BinDir=$ORACLE_HOME/bin ; export BinDir
}

GetData()
{
rm /usr/test/test.csv
touch /usr/test/test.csv
$BinDir/sqlplus -s apps/$pswd <<EOF
spool /usr/test/test.csv;
set serveroutput on size 1000000;
set verify off;
set wrap on;
set colsep ,;
set pagesize 1000;
set trimspool on;
set headsep off;
set linesize 9999;
@/usr/test/test.sql;
spool off;
exit
EOF

}

MaillData()
{
cat /usr/test/test.csv | uuencode test.csv | mail -s “Report ICT-OKE Data” info@ict-oke.com
}

SetEnv

GetData

MailData

exit
 

Website is transferred from joomla to wordpress

The ict-oke.com website has been transferred from joomla to wordpress.

Reason ==> the web host forced us to upgrade joomla to the last available version.
Although some tools are available to assist with this upgrade (jupgrade), the template which has been used caused trouble.

A migration from joomla to wordpress was a very good alternate solution.