Hi Franklin52,
thanks for your reply.
what i'm trying to do is commenting or uncommenting specific lines. for instance these repositories:
# deb http://www.lamaresh.net/apt lenny main
# deb-src http://www.lamaresh.net/apt lenny main
could be defined by setting the variable REPO to "lamaresh". however, doing so with the current sed command, it will take both lines while i want to be able to control which line get uncommented.
so i'm looking for something that can search for a string and commit a change in the line containing the search string, but skip the line if another search string is present. i hope this is clear?
so for instance, uncomment/comment if "lamaresh" and "deb" are found, but do nothing if "lamaresh" and "src" are found, with a result like this:
deb http://www.lamaresh.net/apt lenny main
# deb-src http://www.lamaresh.net/apt lenny main
Frankin52, you're a genius.
i never thought of concatenating the two search terms to narrow down the hits.
thank you very much
heel erg bedankt, wil je wat bits van mij?