[clue-cert] many

David L. Willson DLWillson at TheGeek.NU
Tue Mar 24 11:34:57 MDT 2009


> > I forgot to teach a redirector.  My favorite.  " >> "  Look it up
> and I'll
> > cover it next time we get together.

> We skipped "<", but I found that I use it pretty often, mainly in
> MySQL.
> 
> mysql -ubob -pmypass bugtracker < db_generate.sql
> 
> This runs the command "mysql -ubob -pmypass bugtracker" with the
> contents of 
> db_generate.sql as standard input.
> 

You're right!  I use < pretty regularly too!  Ooh, I did a poor job with redirectors...  :-|
I wonder...  Can you put "#!/bin/mysql" or "#!/bin/psql" at the top of a SQL script, mark it executable, and have it run right?  (Given: DB system is configured trust the local authenticator and an authorized person (maybe root) is running the script)


More information about the clue-cert mailing list