Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • Thanks, but I forgot to tell that some times I deal with infinite redirections (due to errors in redirection rules) ! This case will crash the recursive function I think ! Commented Mar 4, 2021 at 11:09
  • What does curl do in this case? You could add a counter and quit after n redirects. Or quit directly if "$1==$url" (or simply hit ctrl+c if interactive).... Commented Mar 4, 2021 at 11:09
  • 1
    added a counter to stop after 10th request. Commented Mar 4, 2021 at 11:27