This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Linux / UNIX and the fly likes pattern matching using ls command Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "pattern matching using ls command" Watch "pattern matching using ls command" New topic
Author

pattern matching using ls command

deepu bhadriraju
Greenhorn

Joined: Aug 01, 2012
Posts: 14
Create the following files: chapa, chapb, chapc, chapd, chape, chapA, chapB, chapC, chapD, chapE, chap01, chap02, chap03, chap04, chap05, chap11, chap12, chap13, chap14, and chap15.


With reference to question 7, What is the command for listing all files ending in small letters?


With reference to question 7, What is the command for listing all files ending in capitals?


With reference to question 7, What is the command for listing all files whose last but one character is 0?


With reference to question 7, What is the command for listing all files which end in small letters but not 'a' and 'c'?

i tried with the following command ls *[a-z] on fedora linux but it is giving all the fill that end with small and captial letters
please give me correct ls command for the above exercise
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17011
    
  26

We're not here to do your homework for you, but here's a useful hint: "glob". Ask Google.


Customer surveys are for companies who didn't pay proper attention to begin with.
deepu bhadriraju
Greenhorn

Joined: Aug 01, 2012
Posts: 14
Tim Holloway wrote:We're not here to do your homework for you, but here's a useful hint: "glob". Ask Google.[/quote


I too don't want you to do my homework.i never expected this kind of reply.i made a mistake of copying all the questions. if you can correct what mistake i made in the above command i.e ls *[a-z] for the first question
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: pattern matching using ls command
 
It's not a secret anymore!