marc@pinet.aip.org (Marc Wiener) (08/31/90)
I am trying to sort a directory containing file names as follows:
f002s0
f002s1
f002s3
w002s0
w002s1
w002s3
I would like the files sorted on character positions 1-5, with character
position 0 (the f or w) in reverse, i.e.,
w002s0
f002s0
w002s1
f002s1, etc.
This does not seem like it should be so difficult, and I assume I'm missing
something in my understanding of sort. I can sort this on a non-Unix OS
without problems. What am I doing wrong?
--
Marc Wiener | marc@pinet.aip.org
American Institute of Physics | marc@aip.bitnet
500 Sunnyside Blvd. |jimr@hp-lsd.COS.HP.COM (Jim Rogers) (09/05/90)
The form of the sort command you want is: sort +0.1 +0r -0.1r Jim Rogers Hewlett Packard Company