in reply to Re^2: joining multi lines using xargs
in thread joining multi lines using xargs

So xargs doesn't work. Are you asking us to fix xargs (in which case you're in completely the wrong forum), or are you asking us to give an alternative unix command? I've already done the latter, but here it is again:

perl -pe'chomp; END { print "\n" }' file

Not only does that not segfault, it doesn't corrupt the file (e.g. collapse swhitepace) like xargs does.