17 Mar
2022
17 Mar
'22
16:58
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
tks
Two options - a) put the regex in quotes, then you need only one backslash. b) without qoutes, you need three backslashes. -- Per Jessen, Zürich (11.8°C)