cli.fail

Practice this fail.

That dot matched everything.

Linux · Restart as often as you like

Read the error, choose a command, and learn
why it works. Nothing runs on your machine.

Browse all practice ↗

Linux · Intermediate

Using GNU grep, print lines containing the literal string api.example.com in hosts.txt. Dots must not act as regular-expression wildcards.

That dot matched everything.

$ grep api.example.com hosts.txt

apiXexampleYcom

How do you treat the pattern as fixed text?

3 attempts remaining

Read why this fix works

That dot matched everything.

grep -F -- api.example.com hosts.txt

grep -F matches fixed strings rather than regular expressions. Shell quoting alone does not turn a regular-expression dot into a literal dot.

Practice rounds do not affect the daily score or local streak. Try today’s challenge, or choose another scenario.

Copy your result