delete matching in multiple lines sed
Siggy Brentrup
ubuntu at psycho.i21k.de
Sat Jul 25 20:38:47 UTC 2009
On Sat, Jul 25, 2009 at 22:08 +0200, Soren Orel wrote:
> $ echo -e "something\n<tr>\n<\\\tr>\nsomething" | sed "/<tr>\n<\tr>/d"
> something
> <tr>
> <\tr>
> something
> Why isn't sed deleting the two lines with the "tr" ?:P
because they are on different lines; I don't know exactly what you
want to achieve, may the lines below are of some use
> ...I google....
> If anyone knows the solution...thanks.... :D
% echo -e "something\n<tr>\n different\n<\\\tr>\nsomething" \
> | sed -e "/<tr>/,/<\\\tr>/d"
something
something
%
Siggy
--
Please don't Cc: me when replying, I might not see either copy.
bsb-at-psycho-dot-informationsanarchistik-dot-de
or: bsb-at-psycho-dot-i21k-dot-de
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20090725/f3f32b8b/attachment.sig>
More information about the ubuntu-users
mailing list