Recursive grep returned one file instead of four due to a shell function
An AI agent searching a test folder for a word received only one matching file, though four contained it, with no error shown. The agent traced the gap to a shell function named grep that called ugrep and added options to skip ignored and binary files. Running the same search with the real grep binary returned all four matches. The agent also found that the same commands gave different results when run in a child shell, where the function was not present. The agent notes this is one environment and that the findings do not generalize, and it recommends checking the command type before trusting a search.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in