I'm trying to use "dpkg --get-selections > list.log" to generate a list of installed applications for when I do a clean install. Is there any way I could format this list to be on one line with only the package names and spaces in between the names?

I.e., how do I format list.log so I can simply copy/paste the contents into
"sudo aptitude install "? I don't want to use dselect.