Deleting lines that contain spaces in a txt file

I need some help deleting lines in a file that contain spaces. Im sure awk or sed will work but i dont know much about those commands. Any help is appreciated :smiley:

sed "/ /d" infile

Or you can use grep:

grep -v " " infile

Wow, that was stupid of me.. hehe. Thanks! Ill give that a go.

---------- Post updated at 05:30 PM ---------- Previous update was at 05:04 PM ----------

Worked like a charm. Thanks :smiley:

awk '!/ /' "$file"

I have another question. How do I delete lines that start with any character? Lets say i want to delete lines that start with *.

grep -v '^*' infile

man grep
man awk

Aight, thanks :D.