From 84a99adbb8e7c9609c2f24cb22253f3b20771110 Mon Sep 17 00:00:00 2001 From: ezri Date: Mon, 7 Oct 2024 01:05:26 +0000 Subject: [PATCH] Fix some formatting issues in the invalid character exercise --- invalid-char/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/invalid-char/README.md b/invalid-char/README.md index 569ae1b..5e47543 100644 --- a/invalid-char/README.md +++ b/invalid-char/README.md @@ -10,8 +10,8 @@ The command to run is this: where `^M` is the token inserted as stated above, rather than the literal characters `^` and `M`. -Another option would be to use `\\r`, the more traditional escape sequence for the carriage return character. However, escape sequences like this do not work in single-quoted strings in Bash, so to use this, you'd have to do the following instead: +Another option would be to use `\r`, the more traditional escape sequence for the carriage return character. However, escape sequences like this do not work in single-quoted strings in Bash, so to use this, you'd have to do the following instead: -`sed -i "s/\\r//g /path/to/file` +`sed -i "s/\r//g" /path/to/file` -I tend to avoid using double-quoted strings for `sed` commands, as generally you'd want the `\\` chracter available for regex tokens, and having to escape it every time you use it is annoying, hence why I'd prefer the first command in this circumstance. +I tend to avoid using double-quoted strings for `sed` commands, as generally you'd want the `\` chracter available for regex tokens, and having to escape it every time you use it is annoying, hence why I'd prefer the first command in this circumstance.