The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
how do I negate a sed match
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
how do I negate a sed match
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
6
(
permalink
)
10-04-2006
Jebbur
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
$
Jebbur
View Public Profile
Find all posts by Jebbur
Find Jebbur's past nominations received
Find Jebbur's present nominations given