CLI commands from shell

You can also execute CLI commands from shell in JunOS like this:

admin@router> start shell
% cli show version | grep Hostname
Hostname: router

This could be useful if you must collect some outputs and don’t want to use cut&paste from your telnet/ssh client. And it is a little bit faster, if you request bulk informations like routing tables. So this also a good choice for your scripts.

% cli show version >> log.txt
% cli show route summary >> log.txt
% cli show interface terse >> log.txt

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.