Re: How to hide the output from echo "select..."|dbaccess sysmaster?
Posted in 1999
Huy
Try:
echo "select name from sysdatabase"|dbaccess sysmaster 2>/dev/null |grep
eagle
This will get rid of the Database Opened/Closed and 22 rows returned, but
you will still
have the header "name". But since you are grepping for eagle (so you are
checking
for the existence of the database eagle), you should have no problems with
or without
the 2>/dev/null redirect.
HTH
Sujit
Huy Vu <huyv@usa.net> on 04/07/99 11:33:24 PM
Please respond to Huy Vu <huyv@usa.net>
To: informix-list@iiug.org
cc: (bcc: Sujit Pal)
Subject: How to hide the output from echo "select..."|dbaccess sysmaster?
Hi all,
I'm trying to hide some output displayed from the unix command below for
example:
echo "select name from sysdatabase"|dbaccess sysmaster|grep eagle
Open database... <--------- would like to hide
eagle
22 row(s) .... <--------- would like to hide
Close database.. <--------- would like to hide
I tried to redirect the output to /dev/null 2>&1 but not successful.
Thank you in advance for any idea.
H.V