From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rainer Stengele Newsgroups: gmane.emacs.help Subject: Re: how to sort words in a line Date: Tue, 17 Jul 2007 19:54:43 +0200 Organization: A noiseless patient Spider Message-ID: References: <87r6n7l41m.fsf@thalassa.lan.informatimago.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1184697674 8913 80.91.229.12 (17 Jul 2007 18:41:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 17 Jul 2007 18:41:14 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jul 17 20:41:11 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IAryr-0007aj-8l for geh-help-gnu-emacs@m.gmane.org; Tue, 17 Jul 2007 20:41:05 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IAryq-0003Jd-RY for geh-help-gnu-emacs@m.gmane.org; Tue, 17 Jul 2007 14:41:04 -0400 Original-Path: shelby.stanford.edu!headwall.stanford.edu!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!feeder.news-service.com!news.motzarella.org!motzarella.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 33 Original-X-Trace: tomate.motzarella.org U2FsdGVkX19p6CiHGgWMXEGtFDVaGue0EPvIQ0Ji9p7+VkPbU7UwlmPPPf+EtDhXiiXo2NORSFePN3TgqQkpCMfEmMIL5doqSgRG4lXtV6Pwap8Ts6lc/qQnZbxGbLgWqKGzqoDjcMizyaBn5PZUlg== Original-X-Complaints-To: Please send complaints to abuse@motzarella.org with full headers Original-NNTP-Posting-Date: Tue, 17 Jul 2007 17:54:41 +0000 (UTC) In-Reply-To: X-Auth-Sender: U2FsdGVkX1+7uMng2dS07FOe8etnh9UltoyjAkHSndubGJZWOS0sbrKcwpvrDNc8 User-Agent: Thunderbird 2.0.0.4 (Windows/20070604) Original-Xref: shelby.stanford.edu gnu.emacs.help:150175 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:45761 Archived-At: Harald Hanche-Olsen schrieb: > + Pascal Bourguignon : > > | Rainer Stengele writes: > |> I just couldn't find a fast solution to sort a line of words: > |> > |> zzz aaa hhhh > |> > |> --> > |> > |> aaa hhhh zzz > |> > |> > |> Did I miss a simple command? > | > | AFAIK, no. > | > | But it's rather simple a command to write: > > You could also pipe the line through the command > > tr ' ' \n | sort | tr \n ' ' > > or variations thereof, depending on your shell's ability to interpret > escape sequences like \n. > thanx! calling external processes to sort a line seems to me quite a little overhead. rainer