On Thu, 3 Sep 2015 19:16:21 +0300, Alexander Kapshuk wrote:

> >>> sed -i /libs\//d /var/lib/portage/world  
> >>
> >> After running above I get:
> >> sed: -e expression #1, char 7: unknown command: `/'
> >>
> >> Shouldn't it be:
> >> sed -i /libs\/d /var/lib/portage/world  
> 
> Enclosing the 'sed' commands in single quotes would do it:
> 
> sed -i '/libs\//d' /var/lib/portage/world

Yes, I escaped the / with \ for sed but forgot to then escape the \
for the shell. The reason for deleting all lines containing libs/ rather
than just libs is to only remove entries from a *-libs category.

Sometimes you can try too hard :(


-- 
Neil Bothwick

Never ask a geek why, just nod your head and slowly back away

Attachment: pgpEl0D9eDBhc.pgp
Description: OpenPGP digital signature

Reply via email to