sed question

Lamont Peterson lamont at lamontpeterson.org
Sun Jan 18 04:17:47 UTC 2009


On Saturday 17 January 2009 05:35:19 pm Paul wrote:
> Hi,
>
> mono-debugger has a line in the configure.in with $(prefix)/lib on it
> twice.
>
> If I have
>
> sed -i -e 's!$(prefix)/lib!%{_libdir}!' configure.in

Just add 'g':

 sed -i -e 's!$(prefix)/lib!%{_libdir}!g' configure.in

> then only the first occurrence of the $(prefix)/lib is replaced (same
> applies if I create a patch with @libdir@ instead of the $(prefix)/lib
> and then apply a similar sed replacement to the patch)
>
> I've looked at the manual and this seems to be correct, but it's not (as
> it's not working!). Any clues on how to do a multiple replace on the
> same line?
>
> TTFN
>
> Paul
-- 
Lamont Peterson <lamont at lamontpeterson.org>
[ http://lamontpeterson.org/ ]
GPG Key fingerprint: C51E DD83 B03F D147 A974  939C 5D13 289C 17F1 FFBE
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://lists.fedoraproject.org/pipermail/devel/attachments/20090117/b6572042/attachment.bin 


More information about the devel mailing list