Quote:
Originally Posted by Geneset
Redirections dont work.
|
How are you trying to do the redirection? In order to redirect stderr, you use its
file descriptor (2) - a very simple example:
Code:
rob:~$ mysql -uusername -p <<-EOF 2>>mysql.err 1>>mysql.out
> select * from testdb.contacts;
> select * from testdb.nosuchtable;
> EOF
Enter password:
rob:~$ cat mysql.out
name telephone appid
Rob 09876 123456 1
Carol 01274 245326 NULL
Jeremy 0895 123456 NULL
John 0116 7891234 1
rob:~$ cat mysql.err
ERROR 1146 (42S02) at line 2: Table 'testdb.nosuchtable' doesn't exist
rob:~$