Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

pattern matching using ls command

 
deepu bhadriraju
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18304
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We're not here to do your homework for you, but here's a useful hint: "glob". Ask Google.
 
deepu bhadriraju
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic