From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <140e7ec30802070338w657eaba7hfaef1dc3462cd559@mail.gmail.com> Date: Thu, 7 Feb 2008 20:38:41 +0900 From: sqweek To: "Fans of the OS Plan 9 from Bell Labs" <9fans@cse.psu.edu> Subject: Re: [9fans] Non-parallel loop in Sam In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <47AA38CF.5AC2EDD9@null.net> Topicbox-Message-UUID: 4b021f58-ead3-11e9-9d60-3106f5b1d025 On Feb 7, 2008 8:33 PM, Hongzheng Wang wrote: > > To > > reverse the order of lines within a file already opened by > > sam, I would simply enter the following sam commands: > > ,| nl | sort -rn > > ,x/^ +[0-9]+ /d > > tac Note that plan 9 has tail -r to reverse lines. -sqweek