How to filter dbaccess output in Informix?
<p>I want to run <code>dbaccess &lt;dbname&gt; &lt;sqlfile.sql&gt;</code>, and store the output to a shell variable. I know there are two methods to do (i) output to pipe and (ii) unload to file. I want to use method (i) kind of approach to store the query output to a shell variable, but along with the query output I am getting unwanted things (connected to database, column headings, disconnected) — see the image attached. I don't want to use method (ii) because I need to store query output to a shell variable, not a file. Please help me with this.</p>
<p><a href="https://i.stack.imgur.com/RWXnt.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RWXnt.jpg" alt="all the data which is going to shell variable I have attached" /></a></p>