A web development/programming blog providing info, tips, and tricks on programming languages, scripting, Linux, MySQL and more
Posts tagged Tips
How to reset the bash IFS variable
Jul 9th
Here’s a quick tip for everyone. I was working on a one-liner today at work that involved parsing through a file with some data in it. The data had spaces in it which can cause problems with the default $IFS variable (Internal File Separator). nixCraft has an excellent tutorial on working with the $IFS variable.
Read the rest of this entry »
12 Quick and Easy MySQL Tricks
Dec 5th
In my first two months as a MySQL DBA, I have picked up a number of tips and tricks that have helped me in my daily job. In this post, I share them here with everyone. Hopefully they will help you as much as they have helped me.
Read the rest of this entry »


MySQL Quick-Tip: Target specific versions of MySQL with conditional comments
Jul 14th
Posted by Mark Stoecker in MySQL
No comments
I was working on a project over the weekend that required me to run some code relating to MySQL privileges across a large number of MySQL servers all running various versions of MySQL between 4.0 and 5.0. My initial efforts at this entailed writing out the version specific code and targeting the version with bash thusly:
This method involved a lot of code duplication. Yesterday, a co-worker mentioned using MySQL version specific comments, which I had seen before, but never fully understood.
Read the rest of this entry »