Hey!
This is a simple command line to find a string within all files of a directory and its subdirectories.
Please compile using the shell functionality of repl.it:
on windows it's ctrpl+shift+p > type Open Shell
In the terminal please follow these instructions:
make
./main test
Output should be showing the lines matching your search "test"
./main -l test
Output should be only showing filenames containing matches.
I am not sure whether this has bad practices in terms of memory allocation or even if it has undefined behaviour. I would be grateful if you could review the code and tell me.
Beginner in C here
Top comments (0)