Score:0

Grep: How to search for an exact string of numbers in a file

jp flag

So I have a file 2k6d.pqr with a list of coordinates and I am trying to find one particular one.

I type in

grep "-6.139 0.0488 1.4870" 2k6d.pqr

and it returns an error:

grep: invalid option -- '.'
Usage: grep [OPTION]... PATTERNS [FILE]...
Try 'grep --help' for more information.

I get no error with grep --help so it isn't with the grep installation or path. So I'm doing something wrong. I tried it with both -w and -x and it didn't work. What do I do?

muru avatar
us flag
Use `grep -e "-6.139 0.0488 1.4870" 2k6d.pqr` (maybe also add the `-F` option)
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.