Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Bash Shell ls command to list directory

Posted on 2008-10-30
1
Medium Priority
?
941 Views
Last Modified: 2013-12-26
I use the "ls" command to list the directory and get the output as below.
AAA.BB-1  
AAA.BB-10
AAA.BB-2  
AAA.BB-3  
AAA.BB-4  
AAA.BB-5  
AAA.BB-6  
AAA.BB-7  
AAA.BB-8  
AAA.BB-9  
I was wondering how I can list the directory in ascending order based on the last number of each file? The desired output should be looked as below.
AAA.BB-1  
AAA.BB-2  
AAA.BB-3  
AAA.BB-4  
AAA.BB-5  
AAA.BB-6  
AAA.BB-7  
AAA.BB-8  
AAA.BB-9  
AAA.BB-10
Any suggestions?
0
Comment
Question by:bin571
1 Comment
 

Accepted Solution

by:
bin571 earned 0 total points
ID: 22844896
ls -U
0

Featured Post

[Webinar] Cloud Security

In this webinar you will learn:

-Why existing firewall and DMZ architectures are not suited for securing cloud applications
-How to make your enterprise “Cloud Ready”, and fix your aging DMZ architecture
-How to transform your enterprise and become a Cloud Enabler

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The following is a collection of cases for strange behaviour when using advanced techniques in DOS batch files. You should have some basic experience in batch "programming", as I'm assuming some knowledge and not further explain the basics. For some…
Recently, an awarded photographer, Selina De Maeyer (http://www.selinademaeyer.com/), completed a photo shoot of a beautiful event (http://www.sintjacobantwerpen.be/verslag-en-fotoreportage-van-de-sacramentsprocessie-door-antwerpen#thumbnails) in An…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
Suggested Courses

972 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question