loading...

Basic command line "find" written in C. Asking for review.

github logo ・1 min read

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

twitter logo DISCUSS
Classic DEV Post from May 19 '19

Don't let that huge codebase scare you! Tips and tools to make sense of other people's code

Parsing through a large, existing codebase can be challenging if you're new to a project. I'll share a few tips and tools for how you can make sense of other people's code without going crazy.

Axel profile image

dev.to now has dark mode.

Go to the "misc" section of your settings and select night theme ❤️