remove space from file content

i am a bit new to shell scripting
i have a file containing
xxxx xx xx
but i want to output the content as
xxxxxxxx.
thus removing the space.
any idea how i can do this

Use tr

tr -d ' ' <  file

$

echo "xxxx xx xx" | sed 's/ //g'

xxxxxxxx

-Devaraj Takhellambam

Thanks but how can i use the output as a variable

output=`echo "xxxx xx xx" | sed 's/ //g'`