If I put a * or . on the end of a grep command, I will get results instantly. However, if I don't, the command never returns anything.
I'd appreciate it if someone could tell me why, or direct me to a source that includes that information! Looking online all, everything talks about searching FOR a period or asterisk in your search. Most examples don't include a * or ., and the ones that do don't tell me what they're actually doing.
Thanks!
Without a list of files to search, grep reads stdin by default. e.g.
$ grep -o a..
This appears to freeze, but is actually just waiting for input
app
ars
act
all
ait
^D
By the way, grep’s more useful cousin, ack, does what you’d expect. :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With