It's been awhile since I've posted a question on here. Need some assisteancew getting my sed to work. I've tried all kinds of forms of sed options, but can't seem to get this working. I have a file that has "192.*" all over it, and need any type of IP address that has any resemblence of "192" in it, all deleted, but I need to literally keep everything else. Something that looks like:
+ : root : 192.,local,10.
+ : root : local,192.
+ : root : local,192.,10.
+ : root : local,10.33.45.34,192.168.22.100
+ : root : local,192.168.22.100,10.33.45.34
+ : root : local,192.168
+ : root : local,192.168,10.
Item's I've tried:
sed -e 's/,192.*$//g' -e 's/,192.*,//g' -e 's/192.,//g'
sed -e 's/,192.*$//' -e 's/,192.*,//' -e 's/192.,//'
sed -e 's/,192.*$//' -e 's/,192.*,//' -e 's/192.*,//'
sed -e 's/,192.*$//' -e 's/,192.*,//' -e 's/192.,//'
I've just about gone crazy, so some help is appreciated.
Thanks in advance.