From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: Date: Thu, 7 Feb 2008 00:57:49 +0800 From: "Hongzheng Wang" To: 9fans@cse.psu.edu Subject: [9fans] Non-parallel loop in Sam MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Topicbox-Message-UUID: 498587aa-ead3-11e9-9d60-3106f5b1d025 Hi all, I'm new to Plan9 and also this mailing list. After some experience with Sam's structral regexp, I become quite interested in this editor command. And I also noticed that the loop and condition commands of Sam, say x, y, g, v etc, are somewhat different from the commands of ed. For example, all changes in a x command execution occure simultaneously, rather than the model used by ed where each change would be made at once even in a g command execution. As a result, some tips in ed, such as ',g/^/m0' to invert all lines of a file, would be invalid. My question is, how to impliment non-parallel loop/condition commands in Sam? In another word, how to do things, such as inverse all lines, in Sam? Thanks. -- HZ