I am trying to sort the listing of directories by starting with the second character.
For example, if I do the code below, the listing of the directories are in order based on the first character.
$ ls -1d */
lrodriguez/
mreynolds/
yalberto/
What I want to accomplish is to display them as:
yalberto/
mreynolds/
lrodriguez/
I've looked at the following forum: How to sort files by part of the filename? but had no success.
I have tried something like: ls -1d -- *?[a-z]* | sort -t?[a-z] -k2
but didn't get any results. Pretty new to the Unix environment and any pointers will be very helpful. Thank you in advance.