From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: Re: [9fans] page as a presentation tool Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v552) From: Rob Pike To: 9fans@cse.psu.edu Content-Transfer-Encoding: 7bit In-Reply-To: <200311052136.hA5LaXoY023369@localhost.localdomain> Message-Id: <36000D8C-0FD9-11D8-A204-000A95B984D8@mightycheese.com> Date: Wed, 5 Nov 2003 13:44:19 -0800 Topicbox-Message-UUID: 800d74ba-eacc-11e9-9e20-41e7f4b1d025 > Thanks. That solves the problem with 'u'. The problem with 'x', > I fear, is my own misunderstanding of sam's syntax. sam doesn't > allow a space between 'x' and its regular expression argument, though > it is quite happy to allow one between 'c' and its regular expression > argument. Since this first bit me on the UNIX version I assumed it > was a problem with the UNIX version. 'c' doesn't have a regular expression argument. but anyway, i know what you're talking about. there's a notational shorthand that may be the source of your confusion. x/foo/ command looks for foo and runs the command. one useful value of foo is lines: x/.*\n?/ command this is so common that it's given a shorthand: an absent pattern: x command thus one may write x g/bar/ command to run the command on every line containing bar. but, x /foo/ command means for every line, run /foo/ command which isn't what you want at all. obviously, this is a huge semantic swing for the measly addition of a space. mea culpa. -rob