Match lines with GNU sed with a pattern that contains white spaces
Hi, i'm not aure whether this is the right sub for my question. Sorry if not. Anyway here is my problem:
I can't find a way how to match a line with a pattern containing white spaces with gnu sed. I want to uncomment the matching lines.
Here is a sample of my file :
anon-access = read
auth-access = write
Expected result :
anon-access = read auth-access = write
I'm trying something like this :
sed -i '/#.* auth-access = write /s/#//'
Also tried this:
$ STRING="auth-access = write" $ sed -i '/#.* $STRING /s/#//'
Any help would be appreciated!
[link] [comments] ...