MySql Migration Script ( Common Concepts ) Part 2

This is the continuation of Common Concepts, Part 1 is located here and if you have not downloaded the mysql script accompanied with this tutorial it can be downloaded here mysql-migrate.tar These topics will be briefly covered: Inline input redirection using “Here Documents” (Part 1). Inline input redirection using “Here Strings” (Part 1). Command substitution [...]

Continue Reading...

MySql Migration Script ( Common Concepts ) Part 1

Link to example script for tutorial: mysql-migrate.tar This post will not target one particular topic but several small topics that can aid you in the development of bash scripts. The best way to learn a new concept is to apply it to a real world problem….right? For that reason I provided a link to a [...]

Continue Reading...

Power of the Exclamation !

Not commonly used, but easily a unique and cool command the “!” event designator can cut down on the amount of typing you do. Let’s start with a few examples to demonstrate it’s power. Let’s say you want to run a previously executed command that began with a certain word. This can be achieved by [...]

Continue Reading...

Gawk SSH Log Report

Gawk Man Page Gawk is an advanced text manipulation programming language that can be used for extracting/modifying and formatting text based data. There are so many examples and applications for gawk, but we will be looking at formatting a report from the ssh logs. There are many things you could do with the report like [...]

Continue Reading...

You want to find what and do what…

If you use any *nix operating system you’ve probably used the find command. Most people don’t know how powerful the command is, so let’s take a look. I know what some of y’all are thinking, “find is not specific to bash”. This is true but it is also true that it can be very useful [...]

Continue Reading...

Hello Bash

Learning Bash/scripting is not a hard thing to do and as a sysadmin/enthusiast/hacktivist or what have you; scripting can save a lot of time and solve lots of problems. So let’s create our first bash script. Keep in mind there is more than one way to skin a cat. If you find better ways to [...]

Continue Reading...