Out put of first command
[ec2-user@ip-172-31-21-217 ~]$ echo 'select * from xi_users;' | mysql -u root -pnagiosxi nagiosxi -t >/tmp/info.txt
[ec2-user@ip-172-31-21-217 ~]$ cat /tmp/info.txt
+---------+--------------------------------------------+----------------------------------+----------------------+--------------------------------------------+------------------------------------------------------------------+---------+
| user_id | username | password | name | email | backend_ticket | enabled |
+---------+--------------------------------------------+----------------------------------+----------------------+--------------------------------------------+------------------------------------------------------------------+---------+
| 1 | nagiosadmin | 0eb0a38cfbcf77985e4d281b78cc3336 | Nagios Administrator |
[email protected] | lr8mq8tm | 1 |
| 2 |
[email protected] | 0d57a5971168b9c8aa2cc7abc60aff9f | Naveen |
[email protected] | dlnqr96k9v4rua3atav66u3p4lo4gnurajj5ron5mqvi4vpuam4fl66ootr6jn0s | 1 |
| 3 |
[email protected] | b96896a1fa505b72a5dccfb615837b35 | Chandra Pedapudi |
[email protected] | l3ukpvkco3oerrf6ea9c84oqfqs3rjhgle2ddjo5mggh9ukm7sveuo8bg5cblso8 | 1 |
| 5 |
[email protected] | 4978e99307f68bb6346c35291c6f669d | Rajesh Basa |
[email protected] | rvtbg6io03iq05bgs452nt7h2otoeiu9hqhut3mt36n4b0h72j7ogd8h557gm3n5 | 1 |
| 7 |
[email protected] | 9178b9555df697232cf7344df79b7916 | Chakrapani |
[email protected] | qpklp7kteaah8093o490nkggnmh92lipe4e5a02la94f9chuepv3bdi33292korv | 1 |
| 8 |
[email protected] | 95b32c5044eeed503f9e81a6e578d915 | Sai Kuppam |
[email protected] | 5eidarj653b3i0a64qqonckljjntqhcuut99mpeprmpem4hqrbgin25alr8fbhb9 | 1 |
| 10 |
[email protected] | b56e0b4ea4962283bee762525c2d490f | John Anto |
[email protected] | 4itldj7sfubojvr2jjhrq58t2j649q6aa0ukj4e2vppiokhc6v5t4aq3st73ncbv | 1 |
+---------+--------------------------------------------+----------------------------------+----------------------+--------------------------------------------+------------------------------------------------------------------+---------+
Attached second command output as info.txt