Implement a bash shell script findlinks that writes all hyperlinks contained in a certain web page to standard output. By hyperlinks we mean URLs that take the following format:



When generating the output, the optional final slash should be removed, and every hyperlink should occur once at most. A possible output of the shell script findlinks could then be:

$ findlinks

Try to make sure that ill-formed URLs (e.g. or http://be) are ignored. Use the findlinks shell script as the basis for another bash shell script domaincounts that counts the number of times a given domain name occurs in the hyperlinks of a given web page, e.g.:

$ domaincounts