Very new to the groovy.
I wanted to crawl all the pages in the site to get the links.
Can anyone help me with that script?
You could use third party tools for same. Check Xenu or similar -
Find broken links on your site with Xenu's Link Sleuth (TM)
Revert in case you still need groovy script..
@umamaheswariy46 I have set up Groovy console in my local and provided step by step to set it up at Groovy scripts in AEM