Linux / Unix: Sed / Grep / Awk Print Lines If It Got 3 Words Only

This is a test. Unix is Best. No Linux is the Best. Space in simple understanding is an area or volume. Outer space .

I need the output: Unix is Best. Outer space .

How do I print all lines that have three (3) words only?

The awk command is well suitable for this kind of pattern processing text file. Awk set the variable called NF. It is set to the total number of fields in the input record. So if NF equal to three print the line. The syntax is as follows: