I have a listener.ora file for Oracle in which I need to comment out a block of lines specified by a search string, e.g.,>(DESCRIPTION=>>(ADDRESS_LIST=>>>(ADDRESS=(PROTOCOL=tcp)(HOST=sale-server)(PORT=1521))>>>(ADDRESS=(PROTOCOL=ipc)(KEY=extproc))))>SID_LIST_LISTENER=>>(SID_LIST=>>>(SID_DESC=>>>>(GLOBAL_DBNAME=sales)>>>>(ORACLE_HOME=/oracle9i)>>>>(SID_NAME=ales)>>>>(PROGRAM=extproc))>>>(SID_DESC=>>>>(SID_NAME=plsextproc)>>>>(ORACLE_HOME=/oracle9i)>>>>(PROGRAM=extproc)))In the above file I have to search for sales (which is db name) and comment out the whole block which contains that string until the next SID_DESC block. e.g., Desired output:>(DESCRIPTION=  >>(ADDRESS_LIST=  >>>(ADDRESS=(PROTOCOL=tcp)(HOST=sale-server)(PORT=1521))  >>>(ADDRESS=(PROTOCOL=ipc)(KEY=extproc))))  >SID_LIST_LISTENER=  >>(SID_LIST=  >>>#(SID_DESC=  >>>>#(GLOBAL_DBNAME=sales)  >>>>#(ORACLE_HOME=/oracle9i)  >>>>#(SID_NAME=ales)  >>>>#(PROGRAM=extproc))  >>>(SID_DESC=  >>>>(SID_NAME=plsextproc)  >>>>(ORACLE_HOME=/oracle9i)  >>>>(PROGRAM=extproc)))
sed command to comment out specific block of code containing search string
shell script;sed