set echo off and on

http://www.unix.com –
Hi
I have written a bash script to capture the output of jmap.
The command i execute is jmap -heap <pid>
This gives details of memory usage of the process with <pid>.
Now jmap not only gives this info but also prints couple more lines, which i am not interested in. Here are the lines that I am not able to capture and I dont want these lines to be echoed
HTML Code:
Attaching to process ID 20850, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 17.1-b03
I tried to set echo off before executing jmap and set echo on after this statement,
(HowTos)

Stories similar to set echo off and on

I'm trying to find the cause of memory leaks in my java application. I need to get a heap dump for a process that is in a long GC-cycle. Jmap isn't working in this case both because app is hanged and because heap is very large.

Unfortunately, jmap throws UnknownOopException on the core dump I took. I suppose that it isn't correct to take core dump during GC.