# [Tuglist] [Repost] Sorting notaion

H.S.Rai tuglist@tug.org.in
Thu, 22 Aug 2002 14:10:31 +0530 (IST)

Below  is my  original mail. In  brief I  want to  sort
notations typed  at random, so  that I get  sequence of
symbols in following order:

A    a    BB    Bb    bb

\alpha and \beta

I am sure this is not a unique problem to me only, most
you must  have faced  such difficulty earlier  and must
have found solution also.

---
H.S.Rai

===============================================

Aug 13 at 7:25pm +0530 H.S.Rai wrote:

I tabulated noations in a tex file, which I wish to sort
in following manner:

First all greek symbols, i.e symbol starting with \ (e.g.
\alpha etc ) then in alphanumerical order with lower case on
top. Following should be list of sorted notation ( Please
treat every variable in new line, I typed in one line to
save number of lines )

\alpha	aa	aA	Aa	b	B	c1

On sorting unsorted data with "sort", I get result as shown
below. It place "\c" next to "c".

Is this affected by LC_COLLATE, if yes, how to manipulate
it? and if this is the only way, then it may be difficult
for me as I know little about such things.

Unsorted
------------------

B  b  B  c  \A  D  e  a  \c

Sorted I get with "sort" command
---------------------------------

a  \A  b  B  B  c  \c  D  e

Desirable
-----------------

\A  \c a  b  B  B  c  D  e

Is "sort" the only utility to do this?

Any other trick?

---
H.S.Rai

------------------------------------------------------
Seek not to change the world, but choose to change your