@charlesyju hello,
If you are good at regular expression you probably could figure something out. I'm not, but played with it a bit and if you use the pipe and designate the proper output modifiers you can get some range functionality:
Provides the output for ports G1/0/10 thru 19:
sh mac address-table | include Gi1/0/([1][0-9])
Provides the outputs for G1/0/20 thru 39:
sh mac address-table | include Gi1/0/([2-3][0-9])
If you want know what port device is connected and his vlan itself from another device, you cant do it. You need access the device directly to know it.
more information:https://community.cisco.com/t5/switching/show-mac-address-table-interface-lt-interface-range-gt/m-p/2955998
Jaderson Pessoa
*** Rate All Helpful Responses ***