[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to sort words in a line
From: |
Rainer Stengele |
Subject: |
Re: how to sort words in a line |
Date: |
Tue, 17 Jul 2007 19:54:43 +0200 |
User-agent: |
Thunderbird 2.0.0.4 (Windows/20070604) |
Harald Hanche-Olsen schrieb:
> + Pascal Bourguignon <pjb@informatimago.com>:
>
> | Rainer Stengele <rainer.stengele@diplan.de> 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
- how to sort words in a line, Rainer Stengele, 2007/07/17
- Re: how to sort words in a line, Pascal Bourguignon, 2007/07/17
- Re: how to sort words in a line, Rainer Stengele, 2007/07/17
- Re: how to sort words in a line, Thien-Thi Nguyen, 2007/07/17
- Re: how to sort words in a line, Nikolaj Schumacher, 2007/07/17
- Re: how to sort words in a line, Mathias Dahl, 2007/07/18
- Re: how to sort words in a line, Rainer Stengele, 2007/07/18