in reply to Yet Another threaded find|grep perl utility
In C, one need not search character by character either. There are strstr and memmem (index in perl).
And... "I've updated the requirements once, pray that I update them no further." Better ask your teacher if the search string may include newlines or not. In case there's no line length limit, one might (ab)use the getline on the C side.
|
|---|