Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations JAE on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to use grep command???? 2

Status
Not open for further replies.

adrianmah

Computer
Joined
Mar 31, 2003
Messages
4
Location
AU
hi, i am new in linux,i need to know how can is get the result for the follow using grep command.

1)All words in which "x" appears anywhere before "k".
2)All words in which "k" appears anywhere before "x".
3) All words containing both an "x" and a "k".
4) All words containing a "q" not immediately followed by a "u".
5) All words containing "ae",
and beginning with a lower case letter,
and not beginning with "ae",
and not ending with "ae".
 
Your better off using 'sed' for your purposes.
 
I think you might have better results if you use awk. The man pages aren't so good for awk. See O'Reilly's book on SED & AWK.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top