Resolvendo equações com o IOS.sh

O Cisco IOS é realmente um software poderoso. Já falamos aqui no blog sobre o EEM (Cisco IOS Embedded Event Manager, Verificar em qual porta está um determinado IP, Switch envia email se o processamento estiver alto) e outras funções mais comuns como Comandos para o Cisco IOS File System, Filtrando comandos show no IOS, Criando atalhos (alias) no Cisco IOS.

Mas essa eu não sabia (vi no Netfinders Brasil): Podemos usar o IOS para resolver equações.

ios_sh

Para isso basta habilitar o IOS.sh (disponível a partir da versão 15.1(4)M e 15.1(2)S), e depois é só inserir suas variáveis e funções.

Exemplo: Resolvendo equações com o IOS

BrainRT01#terminal shell
BrainRT01#x=1
BrainRT01#y=5
BrainRT01#let “result=(x+y)/2”;echo $result
3
BrainRT01#

Para ver as opções disponíveis no IOS.sh podemos usar o comando man.

BrainRT01#man IOS.sh
NAME
    IOS.sh – process shell input

DESCRIPTION
The IOS.sh is a set of add-on features to the IOS
CLI. These features enables users to write scripts,
execute functions, evaluate numeric and logical expressions,
and perform loops over data using a standard, easy to learn
syntax.

In addition, the IOS.sh offers variable substitution, enhanced
quoting, and a series of builtin functions that are designed to
simplify the job of interacting with an IOS router.

In order to learn about the IOS.sh, a set of man pages such as
this one have been prepared to describe the various new features.
The following man pages may be used learn about the shell.

man compatibility   –  gives a quick overview of compatibility between shell and traditional IOS CLI
man variables       –  describes the usage of variables
man scripting       –  gives a quick overview of the scripting capabilities of IOS.sh
man expressions     –  describes the expression syntax built into the IOS.sh
man loops           –  describes loop structures built into IOS.sh
man functions       –  describes how to use and write functions
man quoting         –  describes the new quoting facility
BrainRT01#

Bom, talvez resolver equações não seja a melhor opção para esta funcionalidade, mas espero que isso sirva para gerar outras ideias.

Mais informações sobre o IOS.sh  aqui.

Até a próxima.

About Us

Luckily friends do ashamed to do suppose. Tried meant mr smile so. Exquisite behaviour as to middleton perfectly. Chicken no wishing waiting am. Say concerns dwelling graceful.

Services

Most Recent Posts

  • All Post
  • Branding
  • Certificação
  • Cisco
  • Cloud
  • Configuração
  • Configuração Básica
  • Development
  • Geral
  • Informação
  • Leadership
  • Linux
  • Management
  • Microsoft
  • Network
  • Security
  • UC
  • Virtualização
  • Wireless

Company Info

She wholly fat who window extent either formal. Removing welcomed.

Your Business Potential with Our Proven Strategies

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.
Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Company

About Us

Contact Us

Products

Services

Blog

Features

Analytics

Engagement

Builder

Publisher

Help

Privacy Policy

Terms

Conditions

Product

Lorem ipsum dolor sit amet, consectetur adipiscing elit.
You have been successfully Subscribed! Ops! Something went wrong, please try again.
© 2023 Created with Royal Elementor Addons