2005-07-16

Bash: Input redirection

Nice, in order to simulate keyboad input for some console command, including Enter key button press, we can write something like that:

   /usr/bin/mysql <<!!
use db_name;
drop table table_name;
!!

All between !! and !! will be passed to standard input.