On Fri, 7 Feb 2025, tom ehlert via Freedos-devel wrote:
It's a port of GNU grep 2.0 (1992). It does not support recursion by
itself yet (-r). Therefore one would need a real mode port of GNU or
BSD find, which unfortunately does not seem to be available for FreeDOS.
Couple options then:
1. Add /S support to FDOS FIND;
2. Port GNU or BSD find (circa 1992 to keep things simple) to FDOS using
Open Watcom (grep has been ported to DOS using MSC).
3. Port grep to Watcom
teach grep recursive search
in the end, the only option is to start coding. A real programmer would have
finished
recursive search, and probably regexp port by now. Instead you write emails.
Have fun!
Tom
I actually attempted a quick port of my own grep earlier today; that's how
I knew what was needed that Watcom didn't have. ;) It uses Henry
Spencer's regex library; I think NetBSD's does the same. (The missing
"ftw.h" is specifically used for directory recursion; I think the BSD
implementation uses "fchdir", which would be nontrivial to implement under
DOS.)
Here's the important part of the code if anyone else wants to give it a
whack because it's probably a lot simpler than either NetBSD's or GNU's:
https://github.com/buricco/strix/blob/main/src/grep.c
-uso.
_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel