Skip to content

Correctly escape newlines in tr invocations#48

Merged
chrisnovakovic merged 1 commit intoplease-build:masterfrom
chrisnovakovic:tr-escape-newline
Nov 22, 2024
Merged

Correctly escape newlines in tr invocations#48
chrisnovakovic merged 1 commit intoplease-build:masterfrom
chrisnovakovic:tr-escape-newline

Conversation

@chrisnovakovic
Copy link
Copy Markdown
Contributor

The replacement of newlines with colons doesn't work as expected - it replaces literal n characters, not newlines:

$ echo -e "one\ntwo\nthree" | tr \\\\n :
o:e
two
three

Simplify the tr invocation and ensure it actually replaces newlines.

The replacement of newlines with colons doesn't work as expected - it
replaces literal `n` characters, not newlines:

```
$ echo -e "one\ntwo\nthree" | tr \\\\n :
o:e
two
three
```

Simplify the `tr` invocation and ensure it actually replaces newlines.
@chrisnovakovic chrisnovakovic merged commit 459fb3c into please-build:master Nov 22, 2024
@chrisnovakovic chrisnovakovic deleted the tr-escape-newline branch November 22, 2024 11:53
@chrisnovakovic chrisnovakovic requested review from toastwaffle and removed request for toastwaffle November 22, 2024 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants