convert new line to tab

hey i m newbie i dont know whether this is happining in my terminal or is there any reason behind this
here it is
when i do
1.) sed -n 's/\t/\n/gp' space > enter #where space is tab seperated file
it works fine it give me a outupt that all tab seperated convert into column

but when i tried to reverse this it wount work
2.) sed -n 's/\n/\t/gp' enter > space

it wouldnt give me any output
i know there is an alternative for this
3.) cat enter | tr "\n" "\t"

i only want to know is there any reason behind the 2 case

thanx in advance

your use of single-quotes negates the reg exp... Try it w double-quotes, which allow the shell to interpolate properly...

no its not working after double quotes

There can be no newline inside a line read from a file.

No need for cat:

tr "\n" "\t" < enter

Or:

awk '{ printf "%s\t", $0 }' enter