A short post today; I found some interesting error reporting in NXOS, and wanted to quickly share for your amusement.
In the example below, I’m trying to filter the list of interface descriptions, but I forgot to add the “inc” after the pipe (
router11# sh int desc | svr ^ Invalid command (interface name) at ‘^’ marker.
Curiously, NXOS points to “desc” as the source of the error, indicating that it was expecting an interface name; but the command itself is perfectly valid. Expanding the keywords (
show interface description) makes no difference to the error.
Maybe it’s something about the
description keyword, so let me give NXOS the interface name it was hoping for:
router11# sh int e1/24 | mtu ^ Invalid command (too many ranges) at ‘^’ marker.
Whaaaa? Well, that went in a direction I didn’t expect!
I don’t envy anybody who has to write a command interpreter (LEX for the win?), but I find it fascinating to consider how these commands must have been parsed internally to end up generating these specific errors.