Is there a comment character or do-nothing command in the HP CLI environment?

I'm looking for an equivalent of the exclamation mark (!) in Cisco IOS.

  • There isn't one. However, if you look at the on-device config, it starts with ; ...
    – Ricky
    Feb 25, 2015 at 22:52
  • I saw, but it doesn't work the way I want it to when pasting a configuration. Feb 27, 2015 at 1:22

2 Answers 2


Although there's no direct equivalent to the Cisco IOS "!" to add comment lines to an HP ProCurve switch config file, you can achieve a similar result by using multiple "alias" commands within the config file, with a final "no alias" command at the end of the script to tidy things up:

alias COMMENT "Some procurve configuration comment line here"
alias COMMENT "Second line of comment"
no alias COMMENT

I'm sorry to tell you that I believe the answer is no; you can't just insert a comment wherever you want on Procurves. However, for what it's worth, there is a handy way to configure "friendly" port names so you can at least add what amounts to a comment for each port or group of ports. I use this frequently.

  • Yeah, I knew of the port names already. I'm not looking to document in the config itself, I just want to be able to put comments into a text file that I will then paste into the console of a switch, without it screaming "unknown command" at me for every line. I sort of figured that this was the case. Feb 25, 2015 at 20:24

Not the answer you're looking for? Browse other questions tagged or ask your own question.