18 Mar
2022
18 Mar
'22
00:01
On 3/17/22 17:46, Patrick Shanahan wrote:
* Per Jessen
[03-17-22 10:20]: Patrick Shanahan wrote:
I need to escape the periods in some ip addresses.
I need xc=111.111.111.111 to become 111\\.111\\.111\\.111
sed appears (or not) to be the proper utility but I cannot get the correct syntax.
In which context, Patrick? there are places where you need three backslashes, even four.
grep from bash control line grep 111\\.111\\.111\\.111
Another way: use `grep -F`: -F, --fixed-strings PATTERNS are strings (no need to escape the '.' in fixed strings) Have a nice day, Berny