I'm trying to get the AS ID for each IP address I get back from a traceroute output. What's the best way to do this? The only command I know right now is 'whois ip_addr' but that returns too much information, and is very difficult to parse (since I'm doing this all in a command line script).
I know there are many websites which give back the AS that an IP Address belongs to, but since I need this in a script, using the websites does not seem feasible.