The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




Thread: grep problem
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 06-05-2008
balamv balamv is offline
Registered User
  
 

Join Date: May 2008
Posts: 24
Exclamation grep problem

Example:

bashwd
/home/balamv


bash:more test.txt
hello
hello-ssl
welcome
welcome-ssl
hi
bye
bye-ssl
seeyou

I want to get all the lines which contain ssl and also the one does not contain ssl.

Output should be like this.


hello-ssl
welcome-ssl
hi
bye-ssl
seeyou


Note if a line [ex. hello] has the ssl line, then get only ssl.

How to achieve this?