LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-15-2011, 04:59 AM   #1
adarshmca
LQ Newbie
 
Registered: Dec 2010
Posts: 28

Rep: Reputation: 0
Script to mail output of Mysql Queries


Dear all,

I have prepared a simple script that shows the database, tables size in the Database server as :-

Please check the attachment for the script & output.

Now I just want to mail the output of my script to some persons e-mail-ID

Also, I want to do some calculations and provide the information of how much increase data after 1 day daily.


Please guide me how to do this.




Thanks & best Regards,

Adarsh Sharma
Attached Files
File Type: txt status.txt (4.0 KB, 4 views)

Last edited by adarshmca; 03-15-2011 at 05:01 AM.
 
Old 03-15-2011, 05:05 AM   #2
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
Check out the "mail" command.
 
Old 03-15-2011, 08:58 PM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,241

Rep: Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325
Code:
(your_process) | mailx -s "subject of mail" you@some.com
note literal brackets ()s
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Script to mail Mysql Queries adarshmca Linux - Newbie 1 02-15-2011 08:48 AM
mysql queries Eppo Programming 1 07-15-2010 05:39 PM
send output of mysql query to email within same script hattori.hanzo Linux - Newbie 2 12-03-2008 04:14 AM
How do I zip and attach the output data of a grep | awk | mail shell script? 360 Programming 1 05-08-2002 09:26 AM


All times are GMT -5. The time now is 08:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration