Cool little tricks

Every now and then you stumble upon some cool little tricks that you haven’t come across before.

Here’s two I only recently found out about:

1. In recent versions of MySQL (4.0+, I think) you can do:

show create table <tablename>

This will print out the create statement for the table in question. Which makes table replication SQL scripts a breeze.

2. The script Linux command which will record any shell output in a file specified as an option to the command. That means you can turn more or less everything into a shell script, or at least a nice shell script outline which you can clean up and use.

Both of those are probably common knowledge among most people, so apologies to every one who already knew…

Comments are closed.