commands in the terminal

hi..

I have a small question...if I have a textfile..let say apple.txt and I want to

  1. search for all strings that's 6 characters long, and contains the letters a,b,c,d.
  2. search for all words that that begins with "sUn" and ends with "flower"
  3. search for all the words beginning with the word "sUn"

then what's should I write in the terminal?

thanks

Seems like a homework

actually no...I'm trying to work with emacs but it's really hard so I wanted to try with Unix commands first....

I suggest you enter "man grep" into your terminal and study the man page of the grep-utility. Further i suggest you prepare little files with lines that should and should not be matched and play with them to become familiar with with the utility.

You will soon (you come across very intelligent, so i'm sure it will be very very soon) be able to answer your questions yourself and maybe even be able to help others here, who are not quite so quick-witted. Good luck and hope to see you soon contributing here.

I will close here now to give you the necessary silence for your study.

bakunin