Using the Comment Character #
You can copy operational mode commands that include comments from a file and paste them into the command-line interface. A # at the beginning of the command line indicates a comment line. This is useful for describing frequently used operational mode commands; for example, a user's work instructions on how to monitor the network. To add a comment to a command file, the first character of the line must be #. When you start a command with #, the rest of the line is disregarded by the JUNOS software.
To add comments in operational mode, start with a # and end with a new line (carriage return):
user@host>#comment-string
comment-stringis the text of the comment. The comment text can be any length, and you must type it on a single line.Example: Using Comments
File with Comments
#Command 1: Show the router versionshow version#Command 2: Show all router interfacesshow interfaces terseCopy and Paste Contents of the File into the CLI
user@host>#Command 1: Show the router versionuser@host>show versionHostname: myhostModel: m5JUNOS Base OS boot [6.4-20040511.0]JUNOS Base OS Software Suite [6.4-20040511.0]JUNOS Kernel Software Suite [6.4-20040511.0]JUNOS Packet Forwarding Engine Support (M5/M10) [6.4-20040511.0] JUNOS Routing Software Suite [6.4-20040511.0] JUNOS Online Documentation [6.4-20040511.0] JUNOS Crypto Software Suite [6.4-20040511.0]user@host> #Command 2: Show all router interfacesregress@fbi>show interfaces terseInterface Admin Link Proto Local Remotefe-0/0/0 up upfe-0/0/1 up downfe-0/0/2 up downmo-0/1/0 upmo-0/1/0.16383 up up inet 10.0.0.1 --> 10.0.0.17so-0/2/0 up upso-0/2/1 up updsc up upfxp0 up upfxp0.0 up up inet 192.168.70.62/21fxp1 up upfxp1.0 up up tnp 4gre up upipip up uplo0 up uplo0.0 up up inet 127.0.0.1 --> 0/0lo0.16385 up up inet inet6