[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gawk] Efficient way to reverse a string
From: |
Peter Brooks |
Subject: |
Re: [bug-gawk] Efficient way to reverse a string |
Date: |
Thu, 25 Apr 2019 07:49:47 +0200 |
Why not just use 'rev' - as an embedded command if you want the result in
awk:
$ echo the quick brown fox jumps over the lazy dog|rev
god yzal eht revo spmuj xof nworb kciuq eht
On Thu, 25 Apr 2019 at 05:06, Peng Yu <address@hidden> wrote:
> Hi,
>
> The following way to reverse a string seems to be inefficient as it
> involves multiple concatenations.
>
>
> https://www.unix.com/shell-programming-and-scripting/223077-awk-reverse-string.html
>
> Is there a more efficient way to reverse a string? Thanks.
>
> --
> Regards,
> Peng
>
>
--
Peter Brooks
Mobile: +27 82 717 6404
Skype: Fustbariclation
Twitter: Fustbariclation
Author Page: amazon.com/author/peter_brooks