How to order a ls output by suffix?
Posted
by
Luca Borrione
on Stack Overflow
See other posts from Stack Overflow
or by Luca Borrione
Published on 2013-07-03T16:37:17Z
Indexed on
2013/07/03
17:05 UTC
Read the original article
Hit count: 221
bash
Having a ls output like
GGGG_3.0.3_98/
GGGG_3.0.3_d_100/
GGGG_3.0.3_d_101/
GGGG_3.0.3_d_99/
GGGG_3.0.4_104/
GGGG_3.0.4_105/
GGGG_3.0.4_106/
GGGG_3.0_87/
GGGG_3.0_89/
GGGG_3.0_90/
GGGG_3.0_91/
GGGG_3.0_92/
GGGG_3.0_93/
SSS_2.2.3_01/
SSS_2.2.3_02/
SSS_2.2.3_03/
TTT_2.8.3_29/
how to get the elements ordered by suffix?
Also, is there any quick command I can use to know that 106 is the last suffix in this example?
Sorry: it wasn't clear that "the suffix" in the given example is everything following the final underscore.
© Stack Overflow or respective owner