sed: appending alternate line after previous line

Hi all,
I have to append every alternate line after its previous line. For example if my file has following contents
line 1: unix is an OS
line 2: it is open source
line 3: it supports shell programming
line 4: we can write shell scripts

Required output should be
line1: unix is an OS it is open source
line 2: it supports shell programming we can write shell scripts

I think this could be done using sed, but how could i do this please help?
If it cant be done using sed then please suggest other methods

u can use the record feature of vi ( vim).
its very easy. pl let us knw if u cudnt find how to use it.

it is very useful when we dont have sed/awk expertise.

Hi anchal,
thanks for replying
Actually i m very new to unix, therefore not able to figure it out how to do that. Can u please help me how could i do that?
Thanks

Looks like homework... a bit... and posting homework/classroom stuff here is forbidden.. nevertheless. Your part is to look up how it works :wink:

root@isau02:/data/tmp/testfeld> cat infile
unix is an OS
it is open source
it supports shell programming
we can write shell scripts
root@isau02:/data/tmp/testfeld> sed 'N; s/\n/ /' infile
unix is an OS it is open source
it supports shell programming we can write shell scripts

zaxxon's solution is the best one...
Without using sed i tried like this ( its a lengthy code )

#!/bin/bash
Count=0
while read line
do
echo $line >> output.txt
Count=`expr $Count + 1`
if [ $Count -eq 2 ]
then
{
awk -v RS='' '{gsub("\n", FS)}1' output.txt >> new.txt
:>output.txt
Count=0
}
fi
done < testfile.txt
rm -rf output.txt

--------output----------

line 1: unix is an OS line 2: it is open source
line 3: it supports shell programming line 4: we can write shell scripts