does anyone can help me with this homework, please..I am beginner in linux and I don't how to do it
Create a script scanner.sh which will accept two arguments: the first argument is the DNS name or the IP address of a system, or a network address or an IP range, the second argument is optional and can be a port number or a port range (if is missing the entire port range will be used).
The application will have an integrated help (-h or --help option) and will verify the validity of the arguments warning the user if an argument is incorrect. The script will try to establish tcp connections (using telnet) to check if the ports are open, and will list on the screen for each scanned system the opened ports.
Specialized applications are not allowed to be called inside the script (applications like nmap).