I am trying to make a list of URLs of webpages, based on whether the webpages contain the text "XYZ".
The URLs are of the form:
??? is a number starting with 1, incremented by 1 each time, until an error page is encountered (say a page containing the text "ERROR”)
I want to dump the URLs of the positive matches into an output file. I read curl can sequentially scan such URLs, and its output can be passed to grep. However, I am unsure how I can retrieve and save the URL, after the grep output.