How To Extract,Using Bash/Unix/Linux Shell Scripting, The Oracle Data Like Excel Report And Send As Email Attachment?

Posted by Jiltin     1 December, 2008    12,458 views   

This script provides an sample, and then the practical example to connect to oracle database, extract data like excel sheet and attach it with an email list.

First connecting is done with “sqlplus -s $FCP_LOGIN” in silent mode.Then EOF marks the begining of sql statement and another EOF marks end of it.The chr(9) provides the tab required to make this as excel sheet.In fact, it creates a csv file with tab delimited entry.Since the filename ‘FILENAME=”Credit_Card_Failure_Report.xls”‘ ends with xls sheet, when the user opens the file, it automatically converts into excel sheet.The UUENCODE attaches the file as email attachment.

Practical Example1

Practical Example2

#!/bin/sh
#
# P_EMAIL_ADDRESS_TO is a parameter from the concurrent job
#
P_EMAIL_ADDRESS_TO="jay@notesbit.com"
#
# FCP_LOGIN is standard in oracle applications, here I substituted

FCP_LOGIN="apps/pwd@database"

FILENAME="user_report.xls"
sqlplus -s $FCP_LOGIN<<EOF
SET echo OFF
SET feedback OFF
SET heading off
SET linesize 221
SET pagesize 0
SET newpage 0
spool $FILENAME

SELECT RPAD (SUBSTR (username, 1, 15), 15, ‘ ‘)    chr(9)
        RPAD (SUBSTR (emails, 1, 15), 15, ‘ ‘) chr(9)
  FROM all_users;

EOF

if [ -f $FILENAME ]
then
        uuencode $FILENAME $FILENAME ‘ mail -s "$FILENAME status! Reported on `date` " "$P_EMAIL_ADDRESS_TO"
fi

Following Google Searches Lead To This Post: how to extract results from Oracle Sqlplus query in linux bash
store query result in unix scripts
oracle database write excel unix
extract last word in unix
how to send a value from unix to oracle in script
to send email attachments in unix+oracle apps
unix shell sql result columns reading
bash extract numbers from text
unix shell sql query result array
oracle shell linux
parse email domain name bash
unix extract last column
HOw to extract data from xls in unix
“linux script” +multiply
extract between tags in shell
bash substring %%*
bash extract email address text
extract data from txt file bash
an array+shell+msyql data
sed extract word
sed extract urls
extract email attachment unix
store .csv data into array using shell scripts
bash extract words
extract data from oracle in unix
bash csv extract
insert values in excel file in unix script
unix shell command to extract numerics from a word
bash sed parse mail
bash substring last of delimiter
sqlplus to excel multiple sheets
how to extract data using oracle application
unix shell substr strings
extract unix bash shell
extract attachment linux
shell script sed extract data
linux extract values from csv file to use in bash script
unix extract text between tags
sqlplus generate xls multiple sheets
bash sed awk mail extractor
seo shell scripts reporting
extract words in a string with bash
bash script comma delimited varriable
BASH return value from Oracle function
bash sending email from spreadsheet
bash read tab delimited
sqlplus extracting data
php extract varibles from bash
creating xls in unix shell script sheets
bash script sentences to array
store oracle table field values in unix variable
csv file attachment using mail in shell programming
extracting substring in unix
linux bash extract
extract data from emails in unix
howto automatically unarchive in linux
shell script to make excel file from multiple tab
database dump oracle liux export bash shell how
bash extract data from html table
sample shell script in unix to connect orCLE
how to send the oracle output from linux
how to store value from oracle db in unix variable
export data from oracle table to excel on unix
unix shell extract time from date
extracting oracle data from shell script
how to extract record from csv file in unix
“extracting data” “from url” regular expression
oracle spool to different sheets in excel
bash read csv in array
bash query csv database
linux extract attachment
unix extract word
“how to extract oracle comments on tables”
bash extract portions of files
“extract comments” sed
bash, search 3rd field for value, tab delimited
linux unix extract regex from file
bash using query result from sqlplus
how to get results in column through unix script
linux extract xls sheet
bash select sed extract directory
how to display multiple columns in a .xls file using unix
how to extract multiple columns from an sql query using unix
bash script insert multiple data mysql
extracting from database to a csv file using shell scripting
shell script to extract data from oracle database
linux script extract value from mysql
bash convert to comma delimited
Send email status field on a table oracle
shell extract words from a string
how to read data from a file into a variable and display it in unix scripting
extract ${ / shell linux
repoerts from linux to xl sheet script
retrieving data from oracle to unix
linux bash script to extract email addresses
extract value from output linux
shell script + extrat particular word from string
bash script extract filename
extract data txt bash
getting data from mySQL in bash script
select and extract in unix
bash script to email attachment -mutt
shell script extract between —–
query how oracle parse sentence
extract first word shell
get values from oracle table in shell script
bash export to excel
how to store records in an array using UNIX
bash script to extract html links
read attachment data in oracle apps
extracting text from csv file in shell
bash script extracting date from log file name regex
how to “extract a word” in a text file in unix
bash extract ip address from url
Auto extract script for linux
how to extract a numeric value from a list in shell
spool in excel using shell script
shell spool data from table into excel
unix script to get the data from oracle database in csv format
unix script oracle table into csv
unix scripting get multiple columns in csv
unix extract attachment from email text file
Extract in unix shell scripting based on delimiter
how to extract a substring from a string in UNIX
how to export unix shell script data to excel
dumping oracle table under shell
bash extract string
bash save email attachment
extracting date from a filename in unix
linux extract numbers from string bash
awk “extract column from csv”
bash script extract substring csv
How to fetch oracle query output (table columns) into shell variable
extract database through shell
unix automatically pull email attachments
bash extract number from string
how to read values from Excel using a shell script
shell get hostname from url sed
sed extract numbers from string
writing query results to file oracle unix
+sqlplus bash script +”<<" +select
extract third word out of sentence in bash
extract oracle table data to txt file
script bash extract table row in html
shell script storing query results
shell script to extract data from a oracle database
linux bash extract word from sentence
linux shell csv
example oracle query using extract
extract data from a oracle table using spool
shell script to pull data from mysql
bash “extract attachment”
sqlplus through BASH
bash get text between html tag
How can I extract columns from a text file using Unix
how to put output of a sql query to columns of an excel file in shell script
save sqlplus result into a shell variable
oracle extract string Delimiter
bash read excel
bash extract domain from url
linux extract first word in file
how to extract data from database by using unix
extracting sql text file using shell
+sed parse email domain
how to pull data from oracle to unix
linux extract emails
linux extract hostname
bash make excel file
shell script extract column
how to extract attachment from mail?
spool oracle unix date filename
how to use sed to extract ip numbers from log records
how to extract last element from a string + shell script
linux script extract email attachments
unix shell substring
sed extract first word
Excel sheet using Bash
bash sed extract word
bash sed extract last word
fetching multiple database records using unix script
bash average files data
bash first column tab delimited
extract ip from file bash
extract link bash
Linux shell “spool”
shell script oracle query format output
bash extract domain
shell script create xls
display from 2 column in csv file in unix
how to extract columns from text using sed
oracle Export csv shell
extract comma delimited values in oracle
How to write in output in different colums using bash script
sed to extract email
shell script to extract SQL result into csv file
bash extracting adress from file
dump oracle table csv format linux
bash script select column from csv file
bash autoextract
bash extract regular expression
linux bash reading a text file data seperated by commas
shell script extract column from CSV file
connect oracle using unix and send mail
extract attachments from email bash
retrieving data from table using unix shell script
bash extract substring
How to read data from excel file and insert in database using shell script
bash script sqlplus SPOOL paramter
linux shell script print sql select result into file
Oracle Query results to be stored in array using shell script
export unix scripting bash
bash extract string between delimiters
command to extract data from oracle into csv in unix
bash csv to array
how to extract content from website using unix shell scripting
how to export in.csv or .xls format from sqlplus
oracle extract domain from email
how to store values of multiple columns in shell variables
bourne shell extract string from file
linux how to extract column from csv
linux bash read file extract field
linux bash “mail -s” multiple email
how to write in an excel file using shell scripting?
csv to sql converter using sed
oracle regexp extract data
bash script select first column
pull data from MySQL in windows to Oracle database in unix
bash convert csv to tab delimited
extract ip address bash
shell extracter linux
bash word extract
linux read text files into database mysql bash automated
using bash to make sql oracle query
uinx script variables $@ $*
unix extract part of string regex
Unix shell script to read the xls
regular expressions in bash script storing
bash script sqlplus
using database field in unix script
bash, parse text between two delimiter
shell script-extract filename by comma?
unix scripts to export query results to excel
shell script last word bash variable
display excel sheet in mail using unix shell script
extract email shell unix
shell script extract everything between two substrings linux
how to get oracle table data to excel file using UNIX commands
bash csv table operations
how to export mysql database in csv format using unix script
shell extract element
extract word + unix
bash array select delimiter
how to fetch substring from the list of strings in linux shell programming
extract element from list in bash
linux sed extract emails
bash extract string between two strings
linux export tab-delimited
extract last field unix shell script
how to get text file average using bash
nsis sqlplus
scripts linux how to extract a word
php script exce bash script var
bash extract link text
linux script extract attachments
extract records using unix sed command
linux shell substring ## *
extract attachments from oracle
linux cli bash read a cell from csv file
using unix command to insert delimiter between the columns
linux bash script first word extract example
regexp extract domain from url bash
bash script extract certain words
bash extract mysql
read data from text file with tab as delimeter in shell
what is $* $# in shell script
bash select field mysql
some unix cell scripts in oracle apps
unix extract unique rows from list
create excel sheet reports using unix shell script
how to create xl report+sql plus+oracle apps
export mysql data to csv bash
unix sed command to extract data
export data from oracle to excel through shell script
unzip and print the extract filename + shell script
awk extract last word + unix
Unix Shell spooling to excel file formatting
extract element from a file name in linux
“bash fetch display export”
how to connect oracle using unix shell script
unix script csv column base extraction
bash search and extract word from file
connect and inserting values mysql unix script
unix sendmail attachment shell example
how to display the data from the database in the csv format in c shell scripting
c shell script to export data from the database in csv format
how to search a sentence in a text file in bash
shell extract host ip
bash extract host ip
sed command in unix extract records with particular word
how to export a table in bash shell
automatically extract attachments linux mutt
bash save attachments
shell bash manipulate column csv
extract attachments from mail linux bash
extracts fields in a string + Unix commands
extracting variables from file in shell
sql connect unix bash script
sqlplus script to extract table data out of csv
how to extract a word from a string using unix shell scripting
bash script “multiple email ”
extract links from HTML bash
unix read xls from shell
extract a word from a file using a shell script
unix shell script to extract data from database and send to excel
extract mail attached file from sendmail
“sql query” arrays in shell script
How to insert the record into mysql using + unix shell script
bash extract last word in string
what is $* in unix shell script
oracle sql script extract data delimiter
unix shell script to extract data from csv file and write into csv file
bash connect to oracle log file
oracle-to-csv linux command
bash script get last word of sentence
bash extract all the uniq words in a file
storing results in unix bash
bash save attachment email
bash extract substring after word
automatically extract attachment linux
FCP_LOGIN pass parameter to sqlplus
extract attachments linux
bash extract emails from log file
sqlplus with bash unix
how to extract data from text on unix shell
spooling .xls using unix
bash extract date
how to secure apps passwords from fcp_login
linux shell script “last word” from string expr
bash extract links
bash text parser get column
how to pass the text file through sqlplus in select statement +unix
oracle get value into bash shell script
select a column from string bash
bash shell substring extract regular expression
how to read excel file in unix
saving attachements using mail linux
bash email reciever parse
save shell data from php
substring extraction regular expression bash
bash extract value csv
extract email from a file using shell scripting
awk extract fields from sql dumps
bash extract values between delimiters
how to insert data from excel sheet into a text file using linux shell script writing
bash & extract IP address from file
bash extract html links
bash sed extract ip addresses
how to upload excel spreadsheet to oracle using shell scripts
bash extract link html
linux “extract attachments”
unix extract two strings
how to store delimter string values in oracle arrays
Linux SHell column
unix script to extract data to a csv file
how to find record of a table using linux shell script
how to extract the date from a filename in scripting
extract html links using bash
bash commands sed extract string
commad for tab between cells excel sheet +Orcle
script to extract data from oracle in Linux
shell script+extract last word
extraction script bash
how to check for a DB connection in unix shell script
how to parse a text file at a comma in bash
bash pull info from a file
bash script extract mails from text
how to generate formatted excel sheet through shell script
connecting to database using awk script and fetching data
unix script export bash
bash script pulls words from list
unix shell script parse records tab delimited
bash extract html
linux extracting values logs
bash substring parse csv
shell script extracts the data from the log file
SQL +SHELL +extract value
converting oracle regular exporessions into linux
export bash data to excel spreadsheet
Insert a sentence between two sentences in a text file in Linux
substring extract bash
oracle exp bash script
linux expr substring delimiter
extract ip address from log script linux
url string bash parse
Unix shell and reading data from csv
how to extract a word in unix script
bash shell search for sentence in file
extract data from file bash
bash extract column
linux csv bash
awk extract sendmail log information
what is $@ $* in shell script
using sed extract email from file
oracle table function for data extracts
linux script to extract only ip from log
bash script to pass file names from a directory to a oracle sqlplus procedure
linux bash mail attach
bash script oracle
script to export oracle table to Excel
extract oracle table using sqlplus
shell script to extract field
bash pull values from file
linux extract 1st element
extracting email address from mail bash
parsing domain from a url bash shell
how to extract data from oracle at unix and export to excel
sqlcsv in silent mode in shell script
linux script read xls
“export data from oracle to excel”
sample oracle extract script in Linux
bash extracting substring delimiter
shell extract word from string
bash extract substring from file separated with delimiter
how to make an array of the filenames, bash, unix
using bash to return last column in list
oracle export csv bash
extracting from a spool file using unix
extract IP address using awk from unix file
extract many attachments from mail spool
FCP_LOGIN
reading table data from html in unix shell script
extracting an ip address in bash
string as delimiter in shell programming
bash extract data
bash shell substring extraction
bash pull column
exporting shell script reports oracle into csv files
how to extract column using sed
how to extract data from oracle using shell script
spool oracle output to unix folder syntax
how to read select query results in hp-ux shell script
sed extract “third word”
linux extracting numeric data from text based on their values
bash read mysql output multiple columns
bash script extract email
shell script- extract comma & put into array?
unix script to export data to csv file from oracle database
extract using bash
how to extract a number in a sentence in linux
what is $* in shell scripts
bash oracle sql’s result to file
how to extract a word from a sentence from shell script
how to extract a word from output bash
extract mail adresses from textfile shell
linux unzip silent
linux extract column of data
sed extract IP log
bash extract fields from strings
xls sheet using UNIX shell
unix shell script to extract text
store oracle value in a unix shell variable
how to extract a numerical value from file Unix Script
rpad in unix
bash mail multiple attachment
extract server name from URL regular expression bash
bash extract name from domain name
bash extracting numbers from string
bash script delimeters
linux mail extract data
how to create inserts sentences + oracle
connect oracle in bash programming
using extract to create date
bash using awk to extract colum
linux extract email addresses from text
to fetch data from database and display in unix shell script
how to fetch first word of a row using shell
tab-delimited columns shell functions
oracle database into csv extract unix
bash display column in csv file
bash extract mail attachment
bash extract hostname from url
in unix fetch words from comma separated values
bash script auto extract
shell regexp extract
how to put data in separate cells in excel using bash shell scripting
string extraction in unix shell
extract data from sqlplus
unix shell parse date from filename
exctract oracle table format html
bash sed extract substring
“bash script”+read xls file
oracle host string extract
shell substrings extract numeric
extract column unix
extract a word from file in shell script
bash shell extract tag
pulling data from mysql bash script
how to read a concurrent log file using unix sh
bash shell script return orcale value
bash shell oracle sql file
oracle awk example
fetching databse value into variable shell unix
reading oracle table using bash script
unix scripting extract word a line in text file into array
how to write mail in html format using bash script
what is $* in shell
sed extract value from logs
linux script +”output multiple”
sendmail unix script+attach multiple files to email
linux extract unique columns
extract data from sqlplus unix to excel
oracle query bash shell
hp-ux shell scripts tabs
linux sqlplus export cvs
extract with bash
“parse \ in UNIX”
Bash script to convert csv to spreadsheet
linux script extract field
oracle spool csv EOF bash
bash extract attachment email
unix substring filename
extract fields from bash variable
how to pass variables between unix shell script and mysql statements
bash script extract URL from files
how to extract the value from a variable separated by a delimiter using shell script
extract column linux shell
exctrat multiple coumns in unix
shell linux extract rows from file based on column values
what is “$*” in shell script
what is $* in shell scripting
unix scripting example unzip
shell command to extract string from csv file
extracting value of a column from mysql using shell script
connect unix shell database using c#
extract email address using unix
how to read a .csv file and store in a array using shell script
storing output of oracle query in variable in unix
How to read a excel using shell scripts
sed How to extract and list email addresses from files?
bash save attachment
save email attachments bash
convert data to excel format using unix
+sendmail +extract +attachment
pull ip via bash in linux
+sendmail +”extract attachment” +linux
extract text string regular expression bash
unix extract row
how to store value from oracle database to unix
how to extract the output from the database using unix command
extract bash function
bash regex extract words from line
how convert spool file into excel in bash shell script
bash extract email address
Oracle select to shell array
bash extract ip address from logs
Inserting data from file to variable + unix scripting
extracting date from filename Linux
bash extracting fields from a string
Extract example using a shell
bash substring delimiter
extract a word from line using shell scripting
extract data from mysql through unix
bash extract text between html tags
bash text extract tab delimited
bash save email attachement
linux extract field
bash shell script + Mysql + insert a record
bash how to pull words from a string
what $* in unix scripting
unix sed extract field names table
bash write tab delimited
pulling info from text file
export CSV from MYSQL with BASH
extracting data of mysql in unix script
bash parse email for attachments
bash substring csv
bash regexp extract word
oracle regexp delimiter by tab
HOW I CAN EXCTRACT FROM ORACLE TABLE TO EXCEL
bash script unique domains
how to extract particular column in a file through shell script
howto extract html bash
retrieve multiple values from SQLPLUS in a Shell script
linux bash parse get url
bash output sqlplus array
linux bash select column
unix extract column of csv
linux bash write data to csv
unix fetch oracle
korn shell read excel
bash shell fetch
UNIX READING A CSV AND STORING DATA IN VARIABLES
selecting data from table using shell script
“SPOOL TO” “DELIMITER” ORACLE
exporting oracle data to excel using unix
how to send data from unix to oracle
storing .csv contents using awk in shell
linux extract excel data
oracle sqlplus data export bash
extract attachments from email + unix
parse xls shell
fetch oracle db value in variable using unix script
extract heading from html bash
mysql bash shell read two columns
linux auto extract
Extract multiples rows from file – unix
bash auto extract archive
bash substring #*:
windows script to parse a text file and put into excel
sendmail log extract address
print oracle results from bash array
sed extract regular expression domain
+linux +shell +extract +column +comma +separated
how to store data in shell script + oracle
how to store a column of a csv in a listt in shell script
unix output with coloums
storing data in a column to an array in unix
how to extract url links from a text file using bash
how to extract columns from text in shel
extract oracle data in tab seperated format
how to extract data from Xls using C
excel data to bash
how to extract data from oracle using unix
unix and extract word from line
how to pull from a excel spreadsheet with bash script
how to pull out numbers from a string in bash
sed extract word last
bash substring parsing
sed statement to pull the domain name from a string
“bash scripting” and “data from file”
bash script extract emails
bash for oracle
linux email auto save attachment -outlook -lotus -novell
linux mail log extract from to
extract a word out of string unix
output a oracle query result into variable in unix
linux script how to extract data from html tables
oracle extract to csv
how to extract data from a file on unix
bash extract ip address from log
bash extract number from html
regular expressions extract words UNIX
pass variables to mutt bash
reading a sentence using bash script
extract excel data from UNIX
unix – dump substring of field

Post to Twitter  Post to Delicious  Post to Digg    Post to StumbleUpon

Categories : 11i Scripts, Scripts Oracle, Scripts Unix, Web & Scripts Tags : , , , , , ,

Comments

No comments yet.


Leave a comment

(required)

(required)