I would like to replace linefeed by something else like #
I have tried sed but \n doesn't work and \x0a as well
I got file z1
cat z1|hd
00000000 30 0a 61 0a 0a 31 0a 62 0a 0a 32 0a 63 0a |0.a..1.b..2.c.|
and if i try
cat z1|sed $'s/\x30//g'
everything is fine
But it doesn't work for line feed in sed, just an error message
cat z1|sed $'s/\x0a//g'
If i try
cat z1| tr "\n" "#"|hd
everything is fine for linefeed
Why is sed not working for linefeed ?