Sendmail command line to gmail
Had a requirement to send an email to myself from a script. Was surprised to find out that it is quite possible and not necessarily 100% intuitive but works.
Continue reading
Had a requirement to send an email to myself from a script. Was surprised to find out that it is quite possible and not necessarily 100% intuitive but works.
Continue reading
How many people have been using cat to open files in their shell only to pipe the output to another command, or how many have piped things to wc -l from grep? Don’t understand what I am talking about, and want to be enlightened? Check out: Useless use of cat award. This is an old article but the information is probably more relevant than some other information presented in class or online. Lets be honest though and realize that there is more than one way to skin a scripted cat.
There are a number of operations in mysql that could benefit from being optimized in a script that performs these actions on all tables. A List of maintenance commands can be found. As it is, currently I have created a number of scripts for performing Analysis, Backup, Check, Checksum, Optimize, Repair, Restore. The tools are designed to operate on all table names accessible from the INFORMATION_SCHEMA.TABLES with the exception of the information_schema tables.
I was looking for a way to cross platform way to make a microsecond timer or anything less than one second for that matter in bash. Aside from doing a fork each time this function needs to be called, this is a pretty good alternative to c programming because it is quick and dirty. This function will allow us to be portable and not think too much about the implementation for the time being.
#!/usr/bin/perl use strict; use warnings; use Time::HiRes qw(usleep nanosleep); usleep(100);
If you were ever looking at using wget with a proxy – then this is probably the script for you. I haven&squo;t spent much time testing this and it requires a helper program written in perl to get the timer resolution to handle properly. The idea behind this script is to be able to traverse a list of proxies so that you can test accessing your site from a bunch of “different places at once”.
Continue reading
This script is a very simple script that helps one to run sql commands from the command line with the command name and the query as opposed to running all sorts of switches. This is definately not a complicated script and there are probably some security considerations around using such a script with certain fields saved in it. But the main goal is to be able to call the mysql client to give me a result set as simple as possible.
Bash at it&squo;s simplest form is a program that runs other programs for you based on input. Bash also has some other features than this such as the ability to store and retrieve variables stored in the Environment for a shell. If you invoke bash and then exit, you will loose the Environment that was set inside the script unless some special things are done.
Continue reading
I would like to introduce our readers to installment