Hi,
Pls check that '|' and '+' present in Step-1 are not copied to log file in Step-3.
Pls suggest how to get the exact output from Step-1 (i.e. with out losing '|' and '+') in to a log file
~Thanks
Step-1: Execute command
> mysql -utest -ptest -htesthost testdb -e "select * from student;"
+---------+--------+------------+
| name | gender | student_id |
+---------+--------+------------+
| | M | 1 |
| newname | M | 2 |
+---------+--------+------------+
Step-2: Redirect output to log file
> mysql -utest -ptest -htesthost testdb -e -e "select * from student;" &>log_file
Step-3:Cat contents of log file
> cat log_file
name gender student_id
M 1
newname M 2