removing the "\" and "\n" character using sed or tr

Hi All,
I'm trying to write a ksh script to parse a file. When the "\" character is encountered, it should be removed and the next line should be concatenated with the current line. For example...

this is a test
line #1\
should be concatenated with line #2\
and line number 3
when this script is run

should yield....

this is a test
line #1 should be concatenated with line #2 and line number 3
when this script is run

I'm having trouble even getting sed to recognize the "\" character. Can anybody make a recommendation or point me in the right direction?

Try this one, let me know what you get.

awk '!/\\$/ { print $0}
     /\\$/ {sub(/\\/, " "); printf $0}
     END {print ""}' filename

Hi freelong,
your suggestion works great! I don't have any experience w/awk but so I'm assuming 'filename' is the output file to which the modified text is redirected? If this is the case, it's not working but rather the modified text is being redirected to stdout. I'll do a little research on awk and figure it out...

Thanks Again!

i figured out the file redirection... i didn't realize filename was the input file... thanks again!