« PHP imagefilter without GD | Home | JavaScript: build table dynamically »

MySQL: start SQL from shell script

The following code starts the SQL from the shell script directly, without additional SQL file

#!/bin/sh
--/. &> /dev/null; exec mysql "$@"

The detailed explanation of the trick is here

Topics: MySQL, Unix Shell | Submitter: checkthis

Comments

You must be logged in to post a comment.

Keep on coding