0

I have several files in a directory in my unix system that I need to sort. The problem I'm having is that when using the sort -f command it sorts in the order a A b B c C etc. ls does the same ordering. Is there a way I can make it sort with the uppercase letter coming first? i.e. sort in the order A a B b C c ...

Aio
  • 1

1 Answers1

0

With multiple passes through the sort command I think this is what you want:

ls | sort -f -r | sort
Josh B
  • 1,748
  • 16
  • 19