The UNIX and Linux Forums  


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




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #6 (permalink)  
Old 10-04-2006
Jebbur Jebbur is offline
Registered User
  
 

Join Date: Oct 2006
Posts: 1
use the -n option of sed, for example:

sample file link.txt contains:
text
http://www.google.com
text
http://www.unix.com
last line

filter file link.flt contains:
1,$ {
/http:\/\// {
p
}
}

$ sed -n -f link.flt link.txt
http://www.google.com
http://www.unix.com
$