ls
displays the files available in a directory. I want the file names to be displayed based on the length of the file name.
Any help will be highly appreciated. Thanks in Advance
You can do like this
for i in `ls`; do LEN=`expr length $i`; echo $LEN $i; done | sort -n