Re: Removing lines - Part II

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 16.04.2007, at 17:18, Mário Gamito wrote:
i do:
# sed -e 's/<h4 class="post-title"><a
href="http://tuxvermelho.blogspot.com/2006/08/bourne- shell.html">Bourne
Shell</a></h4>/<!--/' < index.html

well you should escape the '/', like:
sed -e 's/<h4 class="post-title"><a href="http\:\/\/ tuxvermelho.blogspot.com\/2006\/08\/bourne-shell.html">Bourne Shell<\/ a><\/h4>/<!--/'

works for me. [1]

you could also substitute '/' with '$':
sed -e 's$<h4 class="post-title"><a href="http\:// tuxvermelho.blogspot.com/2006/08/bourne-shell.html">Bourne Shell</a></ h4>$<!--$'

then you don't need to escape anything except there would be a '$' in the text....

hth
florian
[1]: $ sed --version
GNU sed version 4.1.4
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE,
to the extent permitted by law.
--
Florian Klien
student of Telematics, tutor for 'Introduction to Structured
Programming' and 'Software Development Practical Exercises'
at Graz university of technology.
"When in doubt, use brute force.", Ken Thompson


-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Newbie]     [Audio]     [Hams]     [Kernel Newbies]     [Util Linux NG]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Device Drivers]     [Samba]     [Video 4 Linux]     [Git]     [Fedora Users]

  Powered by Linux