This is part of a bash alias where I had to use quadruple backslash in order to escape it for sed:
# The sed with quad //// is to prevent 'unterminated substitute in regular expression':
alias x='... | sed "s/=.*/ \\\\/"'
This is needed because bash will escape \\\\ into \\ which sed then escapes to \.
The easiest way to find this is to replace the sed with echo to see the expansion.
References:
- explanation at [WayBack] regex – Why does sed require 3 backslashes for a regular backslash? – Stack Overflow (by Dennis Williamson).
- echo tip at [WayBack] regex – Why does sed require 3 backslashes for a regular backslash? – Stack Overflow (byRoger Pate who left StackOverflow).
–jeroen


