The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 05-20-2008
era era is offline Forum Advisor  
Herder of Useless Cats (On Sabbatical)
  
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,652
The * wildcard expands to an alphabetic list of file names. If you want it sorted differently, try something like ls * | sort -options -here | xargs perl -ane 'script goes here'

Read the sort manual page and play with ls * | sort | less to see what options exactly will work for you. Remember that your locale settings might affect sort order, too.