Have output from sed
:
http://sitename.com/galleries/83450
72-profile
Those two strings should be merged into one and separated with space like:
http://sitename.com/galleries/83450 72-profile
Two strings are pipelined to tr
in order to replace newline with space:
tr '\n' ' '
And it's not working, the result is the same as input.
Indicating space with ASCII code '\032'
results in replacing \n
with non-printable characters.
What's wrong? I'm using Git Bash on Windows.
Using `sed` to replace \n with a comma By default, every line ends with \n when creating a file. The `sed` command can easily split on \n and replace the newline with any character. Another delimiter can be used in place of \n, but only when GNU sed is used.
Best guess is you are on windows and your line ending settings are set for windows. See this topic: How to change line-ending settings
or use:
tr '\r\n' ' '
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With