From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Andrew Simmons" To: 9fans@cse.psu.edu MIME-Version: 1.0 Message-ID: <3D0F67DC.29863.1AC8A75@localhost> Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: Quoted-printable Subject: [9fans] Sam / text search query Date: Tue, 18 Jun 2002 17:03:24 +1200 Topicbox-Message-UUID: b1a6e40e-eaca-11e9-9e20-41e7f4b1d025 Sorry if this is slightly OT here, but I thought it was the likeliest place to get an answer. I have a problem I was hoping to use Sam for, partly so that I have an incentive to get better at using the command language, but I'm too thick to work out how to do what I want. I have a large number of files, and for each one I need to print out all sequences of adjacent lines such that the first line in the sequence contains "sprintf" and the last line contains "msgprint". Ideally there should be no other occurences of "sprintf" in the sequence of lines, but I can live with it if there are. My na=EFve attempt to do this resulted in the selection of the sequence of lines from the first "sprintf" to the final "msgprint". Can some kind soul point out how to do what I want, or failing that suggest an alternative tool - I could write a program, but feel it shouldn't be necessary. Drifting ever more OT, has anyone had problems running Sam under Windows 2000? It seems to start happily enough, but then gets angry and refuses to respond to anything I type in the command window, before finally locking up under circumstances I have not so far managed to identify.