javascript – Technical Interview – Create a CLI application in 40 minutes

I recently had a technical interview during which I was asked to create a CLI application in 40 minutes. The application had to take 2 arguments, one was a file path, the other was a query string. This involved searching all the files in the path for all occurrences of the string and printing them with the corresponding line numbers in the terminal. It was during a video call where I was doing screen sharing while watching. After about 25 minutes of trying to read the README.md file and some other documents, I told him I could not finish it in 15 minutes. I did another CLI for a challenge to take away, but it was more than 8 months ago and I had 3 days to do it. Otherwise, I have never done a CLI. So my question is: should I have something that I should be able to finish in 40 minutes? This seems to be a big demand for this short time. I am a career changer and I am newer in the field, so I just want to know if my technical skills are really lacking. Thank you!