Sponsored Content
Top Forums Shell Programming and Scripting Help Needed: UNIX shell variables to store Oracle table records Post 302959112 by jgt on Wednesday 28th of October 2015 07:41:51 PM
Old 10-28-2015
Code:
outputfile=some_unique_name
IFS=","
while read ID SUB DB SQL  Email
do
   # run the sql programs
   connect $DB
   sql $SQL using $ID $SUB >$outputfile
   #
   mutt -a $outputfile -s "Report $ID $SUB" $Email
done <metadata_file

"mutt" is an easy to use email client, there are other ways to create an email.
I have no idea how to actually create the $outputfile.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Store return code of shell script in oracle table

Hi friends, I have to do the following things : 1) there should be a shell script returning the returning the return code of the script. and i have to add some more details like on which machine is has run , at what time and other details and then using plsql i have to add a row to Oracle... (3 Replies)
Discussion started by: sveera
3 Replies

2. Shell Programming and Scripting

run shell script from oracle store procedure

hi, this is urgent..can i run a shell script from store procedure without using java. (8 Replies)
Discussion started by: arnabb4u
8 Replies

3. Shell Programming and Scripting

Unix call to Oracle PL/SQL pkg/store.proc

HI, I'm trying to get this right, please can you help. In my unix korn shell script, I call an oracle stored proc within a package and I specify 3 parameters, 2 of which are IN OUT parameters (i.e. I expect the stored proc to change them and return them back to me). Does the unix code... (7 Replies)
Discussion started by: csong2
7 Replies

4. UNIX for Advanced & Expert Users

unix script for update or insert records from a file to a oracle table

Hi, I have delimited file(|). Sample data: 1|name|50009|DS24|0|12 2|name|30009|DS24|0|13 3|name|20409|DS24|0|14 4|name|20009|DS24|0|15 5|name|10009|DS24|0|16 I want to load this data into a oracle table (update and insert) Please help me the commands and also... (1 Reply)
Discussion started by: unihp1
1 Replies

5. Shell Programming and Scripting

How to store contents of a command in array of variables in shell script?

I want to store contents of command dir in array of variables For eg: dir contents are command d2 demovi~ file inven java new untitled folder d1 demovi er1 filename inven~ myfiles ubuntu desktop xmms ----------------------------------- I... (3 Replies)
Discussion started by: netresearch
3 Replies

6. Shell Programming and Scripting

[Doubt] How can I store numbers less than 1? Shell variables

Hi everyone, I am having some problems with my scripts so I hope you could help me. I am trying to store the result of a division in a variable in tcshell but I have the problem that if: For example, dividing 2/100 the result is 0.02 but if I store that I have "0". How can I have 0.02... (8 Replies)
Discussion started by: Bloody
8 Replies

7. Shell Programming and Scripting

Help needed in retreiving records from Oracle

Hello, I am new to UNIX. My Requirement: Need to connect to Oracle database from UNIX and execute an SELECT statement and store the records in a flatfile of Comma delimiter. What I have Succeeded: I was able to connect to Oracle from UNIX. Problem: I cannot fetch multiple... (3 Replies)
Discussion started by: arunvasu2
3 Replies

8. Shell Programming and Scripting

Shell script to read a file and store in variables

I have a input file like this. Sample.txt 30 | TXDatacenter | TXBackupDC 10 | UKDatacenter | UKBackupDC 0 | NLDatacenter | NLBackupDC ...... ...... ...... I need to get these values in different variables like this. Load1=30 PriCenter1=TXDatacenter... (5 Replies)
Discussion started by: Visha
5 Replies

9. Linux

How to store count of multiple queries in variables in a shell script?

how to store the count of queries in variables inside a filein shell script my output : filename ------- variable1=result from 1st query variable2=result from 2nd query . . . . (3 Replies)
Discussion started by: sanvel
3 Replies

10. Shell Programming and Scripting

UNIX Script required for count the records in table

Hi Friends, I looking for the script for the count of the records in table. and then it's containg the zero records then should get abort. and should notify us through mail. Can you please help me out in this area i am lacking. (5 Replies)
Discussion started by: victory
5 Replies
MYISAM_FTDUMP(1)					       MySQL Database System						  MYISAM_FTDUMP(1)

NAME
myisam_ftdump - display full-text index information SYNOPSIS
myisam_ftdump [options] tbl_name index_num DESCRIPTION
myisam_ftdump displays information about FULLTEXT indexes in MyISAM tables. It reads the MyISAM index file directly, so it must be run on the server host where the table is located. Before using myisam_ftdump, be sure to issue a FLUSH TABLES statement first if the server is running. myisam_ftdump scans and dumps the entire index, which is not particularly fast. On the other hand, the distribution of words changes infrequently, so it need not be run often. Invoke myisam_ftdump like this: shell> myisam_ftdump [options] tbl_name index_num The tbl_name argument should be the name of a MyISAM table. You can also specify a table by naming its index file (the file with the .MYI suffix). If you do not invoke myisam_ftdump in the directory where the table files are located, the table or index file name must be preceded by the path name to the table's database directory. Index numbers begin with 0. Example: Suppose that the test database contains a table named mytexttable that has the following definition: CREATE TABLE mytexttable ( id INT NOT NULL, txt TEXT NOT NULL, PRIMARY KEY (id), FULLTEXT (txt) ) ENGINE=MyISAM; The index on id is index 0 and the FULLTEXT index on txt is index 1. If your working directory is the test database directory, invoke myisam_ftdump as follows: shell> myisam_ftdump mytexttable 1 If the path name to the test database directory is /usr/local/mysql/data/test, you can also specify the table name argument using that path name. This is useful if you do not invoke myisam_ftdump in the database directory: shell> myisam_ftdump /usr/local/mysql/data/test/mytexttable 1 You can use myisam_ftdump to generate a list of index entries in order of frequency of occurrence like this: shell> myisam_ftdump -c mytexttable 1 | sort -r myisam_ftdump supports the following options: o --help, -h -? Display a help message and exit. o --count, -c Calculate per-word statistics (counts and global weights). o --dump, -d Dump the index, including data offsets and word weights. o --length, -l Report the length distribution. o --stats, -s Report global index statistics. This is the default operation if no other operation is specified. o --verbose, -v Verbose mode. Print more output about what the program does. COPYRIGHT
Copyright (C) 1997, 2014, Oracle and/or its affiliates. All rights reserved. This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. SEE ALSO
For more information, please refer to the MySQL Reference Manual, which may already be installed locally and which is also available online at http://dev.mysql.com/doc/. AUTHOR
Oracle Corporation (http://dev.mysql.com/). MySQL 5.5 01/30/2014 MYISAM_FTDUMP(1)
All times are GMT -4. The time now is 09:55 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy