fork download
  1. #!/bin/bash
  2. regex='\abc\';
  3. echo $regex;
  4. echo $regex | sed 's/\\/\\\\/g';
Success #stdin #stdout 0s 4220KB
stdin
Standard input is empty
stdout
\abc\
\\abc\\