sed command to replace a word with new line and /

Hi,

I have been trying to replace the key word

"SQL> spool off "

with

"/
show errors"

with out double quotes in all the files in a directory.
above show erros should be displayed next line

Could you please help me how to do that.

I have tried something like this but it dint work.

Regards,
Pointers

perl -pe 's:SQL> spool off:\n show errors:' test

Thats worked for me. Thank you very much.

Is it possible to accomplish with sed commands. This is just to know how to do if it is possible to do with sed.

Regards,
Pointers

---------- Post updated at 07:15 AM ---------- Previous update was at 07:00 AM ----------

How to replace the words matching using the above commands in all the files in a directory.

Thank you very much in advance.

Regards,
Pointers

like this?

# echo "SQL> spool off "|sed 's|.*|/\nshow errors|'
/
show errors