Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!wubios!david From: david@wubios.wustl.edu (David J. Camp) Newsgroups: comp.unix.questions Subject: Delete the hold space in sed? Message-ID: <1990Nov20.021122.5058@wubios.wustl.edu> Date: 20 Nov 90 02:11:22 GMT Sender: david@wubios.wustl.edu (David J. Camp) Organization: Division of Biostatistics, WUMS, St. Louis, MO Lines: 18 I am trying to write a sed program, and I cannot figure out how to delete the hold space. I tried: /$PATTERN/{s/.*\n//;h;} but this fails in some cases, in particular when the search pattern is: /.*/ In that case, the /.*\n/ pattern fails, and the pattern space is copied to the hold space. It works when the search pattern is a simple upper case alphabetic string. Can anyone suggest a good way to do this? Thank you, -David- david@wubios.wustl.edu ^ Mr. David J. Camp david%wubios@wugate.wustl.edu < * > +1 314 382 0584 ...!uunet!wugate!wubios!david v "God loves material things."