Sponsored Content
Top Forums Shell Programming and Scripting How to get and process mysql result set in shell script Post 302340270 by ashok1979 on Monday 3rd of August 2009 06:25:28 AM
Old 08-03-2009
How to get and process mysql result set in shell script

Hi All,
I am in a problem here is the description,
Actually in my shell script i am firing a mysql query which returns multiple records and i have to process each record one by one.
So could any one please suggest me how to solve my problem?
Thanks in Advance
Ashok Sharma
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

In a csh script, can I set a variable to the result of an SQLPLUS select query?

Can someone tell me why I'm getting error when I try to run this? #!/bin/csh -f source ~/.cshrc # set SQLPLUS = ${ORACLE_HOME}/bin/sqlplus # set count=`$SQLPLUS -s ${DB_LOGIN} << END select count(1) from put_groups where group_name='PC' and description='EOD_EVENT' and serial_number=1;... (7 Replies)
Discussion started by: gregrobinsonhd
7 Replies

2. Shell Programming and Scripting

shell script result to file

Since I'm not an expert in shell scripting, I have question on sending script result to file. I have script like this... if condition=0: then echo "service is not running" | mail -s "Server Status" uname@companyname fi sleep 10 if configtion=1: then echo "service is not running" | mail -s... (3 Replies)
Discussion started by: s_linux
3 Replies

3. Homework & Coursework Questions

A function in shell script,how can i get the right result

there is a directory /data/users/osa/psidp/dmp/files/cimdir ,it have some subdirectories ,and also the subdirectoriy have it's subdirectoriis. I want to get all the leaf nodes of the directory path . but the result of the script is wrong ,how can i get the right result somebody who can help... (1 Reply)
Discussion started by: fw0037
1 Replies

4. Shell Programming and Scripting

a function in shell script,how can i get the right result

there is a directory /data/users/osa/psidp/dmp/files/cimdir ,it have some subdirectories ,and also the subdirectoriy have it's subdirectoriis. I want to get all the leaf nodes of the directory path . but the result of the script is wrong ,how can i get the right result somebody who can... (1 Reply)
Discussion started by: fw0037
1 Replies

5. Shell Programming and Scripting

A function in shell script,how can i get the right result

there is a directory /data/users/osa/psidp/dmp/files/cimdir ,it have some subdirectories ,and also the subdirectoriy have it's subdirectoriis. I want to get all the leaf nodes of the directory path . but the result of the script is wrong ,how can i get the right result somebody who can help me... (3 Replies)
Discussion started by: fw0037
3 Replies

6. Shell Programming and Scripting

How do i access sybase using isql and how do i get result set in perl script?

Hi, How do i get result set in perl script using isql while connecting sybase server. I have a perl script which connected to sybase and get the result set. but i wanted to get the result set. How do i get the result set in perl script not unix shell script.. $server ="ServerName"; open... (1 Reply)
Discussion started by: solo123
1 Replies

7. Shell Programming and Scripting

shell script - unexpected result

I hv a file --am executing a script which is giving me unexpected results COntents of file: f1 CMT_AP1_CONT:/opt/sybase/syboc125:150:ASE12_5::Y:UX: CMT_AP1:/opt/sybase/syboc125:150:ASE12_5::Y:UX f1.tmp CMT_AP1_CONT:/opt/sybase/syboc125:150:ASE12_5::Y:UX:... (2 Replies)
Discussion started by: rajashekar.y
2 Replies

8. Programming

Query result from shell script

Hi, I wrote the below script to get the query result from a Syabase DB. isql -s -U **** -P **** SYBASE SERVERNAME USE ***(Database name in Sybase) @command.sql But im not getting the output. Can anyone help me on this (2 Replies)
Discussion started by: rohan G
2 Replies

9. Shell Programming and Scripting

Help needed with shell script to search and replace a set of strings among the set of files

Hi, I am looking for a shell script which serves the below purpose. Please find below the algorithm for the same and any help on this would be highly appreciated. 1)set of strings need to be replaced among set of files(directory may contain different types of files) 2)It should search for... (10 Replies)
Discussion started by: Amulya
10 Replies
MYSQLBUG(1)						       MySQL Database System						       MYSQLBUG(1)

NAME
mysqlbug - generate bug report SYNOPSIS
mysqlbug DESCRIPTION
This program enables you to generate a bug report and send it to Oracle Corporation. It is a shell script and runs on Unix. The normal way to report bugs is to visit http://bugs.mysql.com/, which is the address for our bugs database. This database is public and can be browsed and searched by anyone. If you log in to the system, you can enter new reports. If you have no Web access, you can generate a bug report by using the mysqlbug script. mysqlbug helps you generate a report by determining much of the following information automatically, but if something important is missing, please include it with your message. mysqlbug can be found in the scripts directory (source distribution) and in the bin directory under your MySQL installation directory (binary distribution). Invoke mysqlbug without arguments: shell> mysqlbug The script will place you in an editor with a copy of the report to be sent. Edit the lines near the beginning that indicate the nature of the problem. Then write the file to save your changes, quit the editor, and mysqlbug will send the report by email. COPYRIGHT
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc. 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
Sun Microsystems, Inc. (http://www.mysql.com/). MySQL 5.1 04/06/2010 MYSQLBUG(1)
All times are GMT -4. The time now is 12:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy