Visit Our UNIX and Linux User Community

Top Forums Shell Programming and Scripting How to get df output into MySQL using bash? Post 302436035 by pobman on Friday 9th of July 2010 04:21:20 AM
Old 07-09-2010
Thanks Radoulov,

Worked perfectly, now I just need to work out how it works Smilie
Test Your Knowledge in Computers #9
Difficulty: Easy
A CD-ROM is a type of optical disc that originated in 1982 in South Korea.
True or False?

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Passing a MySql password from bash script

Hi all, I am running this script on Mandrakelinux release 10.1, #1 SMP I have also installed 'expect' separately. I have created an Rsync script, but before any Rsync command does run, a MySql dump must be done first, and I am battling a bit to pass the MySql password from... (2 Replies)
Discussion started by: codenjanod
2 Replies

2. Shell Programming and Scripting

bash mysql export to file

I'm trying to export a mysql query to a .csv file, right now I'm running a successful query like: us_id=`mysql -u $USER_NAME --password=$PASSWORD -D "databasename" \ -e "SELECT * \ FROM databasename.table \ WHERE somefield >0 AND otherfield ='$ctry' \ ORDER BY... (1 Reply)
Discussion started by: unclecameron
1 Replies

3. Shell Programming and Scripting

mysql and bash...

Ok the issue I have is a bit complicated, for me, and my understanding of shell programming and bash is non-existent. Background: I do web development for a team of programmers that make custom kernels for the Android OS. The guys are using a bash script (through gerrit or github, like I said... (4 Replies)
Discussion started by: Nyght
4 Replies

4. Shell Programming and Scripting

How to run bash script from within MySQL

Can someone tell me the syntax to run a shell script from within MySQL? I know there is a way to do it, but I can't remember the syntax. I thought it was something like: mysql> \. /user/myscript; but I get this error: Failed to open file '/user/myscript;', error: 2 Please help!... (4 Replies)
Discussion started by: peterv6
4 Replies

5. Programming

Loop in bash file for mysql

Hi, I'm having problems with a script which some of you helped me with last week. It's a script to check the status of orders in an SQL database, and if the count(*) is zero, then the script stops. If it's non-zero, the script echos the result to a file and then in cron, I cat the file and mail... (3 Replies)
Discussion started by: davidm123SED
3 Replies

6. Shell Programming and Scripting

[BASH] Gawk + MYSQL script

Hello! I've got script to write. It should read databases (names, volumes) from table testdatabase and compares it to actually existing databases in /var/lib/mysql/. If there is no informations about database in table - we should see information "There is no declared informations about database... (1 Reply)
Discussion started by: Zimny
1 Replies

7. UNIX and Linux Applications

Mysql erratic output

Hi,this doesnt give any output mysql -uroot -phruti2 -B -e "use WebNmsDB;select HEADERINDEX from meas_headers where CLLI= '$clli' and IVALSTART>'$ivalstart' and IVALSTART<'$ivalend' and RPTTYPE='$rpttype';" > asdf.txt This generates "good" output mysql -uroot -phruti2 -B -e "use... (1 Reply)
Discussion started by: leghorn
1 Replies

8. Shell Programming and Scripting

Technical questions on bash,mysql and pHp

1. bash -bash escape rules, esp. ',", -how to use Ctrl+R reverse cmd search with regex? 2. mysql -how to use grep in mysql 3. php -why !0 is not evaluated to true? what's its value -php getopt: what if there is duplicate in cmdline args (2 Replies)
Discussion started by: John_Peter
2 Replies

9. Shell Programming and Scripting

Conditional bash/mysql query help

I think(hope) I've got a simple one - I just need to send an email if a mysql query returns any results (ideally - it will never match). Currently I just pipe the mysql query output to the mail program, but of course that emails regardless of the output( and I check this every 10 minutes from... (5 Replies)
Discussion started by: jcass78
5 Replies

10. Shell Programming and Scripting

Mysql output to file

Hi, Below is my code to execute mysql statement , how to save the output to a file ? #!/usr/bin/bash #Script to run automated sql queries #Declaring mysql DB connection MASTER_DB_USER='root' MASTER_DB_PASSWD='root' MASTER_DB_PORT=3306 MASTER_DB_HOST='localhost'... (1 Reply)
Discussion started by: Pratik4891
1 Replies

bcompiler_write_function - Writes a defined function as bytecodes

bool bcompiler_write_function (resource $filehandle, string $functionName) DESCRIPTION
Reads the bytecodes from PHP for an existing function, and writes them to the open file handle. Order is not important, (eg. if function b uses function a, and you compile it like the example below, it will work perfectly OK). PARAMETERS
o $filehandle - A file handle as returned by fopen(3). o $functionName - The function name, as a string. RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 bcompiler_write_function(3) example <?php $fh = fopen("/tmp/example","w"); bcompiler_write_header($fh); bcompiler_write_function($fh,"my_function_a"); bcompiler_write_function($fh,"my_function_b"); bcompiler_write_footer($fh); fclose($fh); ?> NOTES
Warning This function is EXPERIMENTAL. The behaviour of this function, its name, and surrounding documentation may change without notice in a future release of PHP. This function should be used at your own risk. SEE ALSO
bcompiler_write_header(3), bcompiler_write_footer(3). PHP Documentation Group BCOMPILER_WRITE_FUNCTION(3)

Featured Tech Videos

All times are GMT -4. The time now is 01:44 PM.
Unix & Linux Forums Content Copyright 1993-2021. All Rights Reserved.
Privacy Policy