Last week, I wrote about how to use
bash arrays and the MySQL database to create unit and integration test scripts. While the MySQL example was nice for some users, there were some others who wanted me to show how to write
bash shell scripts for Oracle unit and integration testing. That’s what this blog post does.
Student questions are always interesting! They get me to think and to write. The question this time is: “How do I write a Bash Shell script to process multiple MySQL script files?” This post builds the following model (courtesy of MySQL Workbench) by using a bash shell script and MySQL script files, but there’s a disclaimer on this post. It shows both insecure and secure approaches and you should avoid the insecure ones.
Fedora comes with
gedit installed but the
gedit installation is bare bones. You can update
gedit to include supplemental Plug-ins with the following
yum command as the
yum install -y gedit-plugins
It generates the following log file:
Chris Saxon and Kim Berg Hansen collaborated to offer an Obfuscated SQL Contest:
The article read most often on this blog is called "Splitting a Comma Delimited String, the RegExp way".
On this blog there are two articles about this technique, one is about splitting up a single string into multiple rows and the other is about multiple strings into multiple rows.
Links to both articles are included at the bottom of this article.
It seems like there is a need for functionality like that frequently. And just to add to those two articles on the subject, here is a third one combining the first two articles.