Issue
I'm trying to do a quick bulk search and replace for some common strings across a large number of source files. I'm doing this on a Mac, so I know it sometimes behaves a little differently. To start, I'm trying to get the list of all files recursively that contain the string I want to change:
grep -rlF 'oldtext' .
When the command runs, it appears to wait for stdin after displaying a list of files that contain the string I'm looking for. Control doesn't return to a prompt, and I can type and press enter with no real reaction from the terminal aside from the terminal showing what I type as I type it.
Am I calling grep
incorrectly, or is there something about it running on a Mac that I'm not accounting for?
Solution
After reading oguz ismail's comment, I tried a few other things and realized that the command was not waiting for stdin. Instead, it was still running without finding any further results for nearly a minute. After this significant delay, further files were listed as more files were found. After a few other similar delays, the command completed as I was originally expecting.
There were just so many source files that I thought it was waiting for stdin because the MacOS terminal allows you to continue to type while commands are running.
Answered By - chaosTechnician