Skip to content

Instantly share code, notes, and snippets.

View shellscriptx's full-sized avatar
🏠
Working from home

SHAMAN shellscriptx

🏠
Working from home
View GitHub Profile
@shellscriptx
shellscriptx / bot.sh
Last active January 16, 2019 13:48
#!/bin/bash
#
# Importando API
source ShellBot.sh
# Token do bot
bot_token='<TOKEN_AQUI>'
# Inicializando.
ShellBot.init --token "$bot_token" --monitor --flush
# Array associativo
declare -A clientes=(
[francisco]='192.168.1.10:9090'
[rodrigo]='192.168.1.20:23'
[paula]='192.168.1.40:29'
)

test()
{
#!/bin/bash
# 
# Requer: ShellBot v5.9
#
# Importando API
source ShellBot.sh

# script
source plot_bot.sh
#!/bin/bash

# Importando API
source ShellBot.sh

# Token do bot
bot_token='<TOKEN_AQUI>'

# Inicializando o bot
#!/bin/bash
  
# Loop infinito.
while :; do
    # Limpa a tela.
    clear

    # menu
 cat &lt;&lt; _eof
#!/bin/bash

# Delimita a entrada em 3 caracteres.
read -n3 -p 'Digite três letras:' var
echo

# Verifica  a sequência armazenada em 'var' se  está 
# dentro do intervalo de 'a-zA-Z'
if [[ $var == +([a-Z]) ]]; then
@shellscriptx
shellscriptx / menu.sh
Last active April 1, 2018 15:29
Criando menu utilizando o comando 'select'
#!/bin/bash
# Título do menu
echo 'Exibir ?'
# Array contendo as opções do menu.
opcoes=(
'Enderecos existentes no site'
'Cookies recebidos'
'Todas as respostas'
#!/bin/bash

# Importando API
source ShellBot.sh

# Token do bot
bot_token='<TOKEN_AQUI>' 

# Inicializando o bot
#!/bin/bash

# Importando API
source ShellBot.sh

# Token do bot
bot_token='<TOKEN_AQUI>' 

# Inicializando o bot
# Cores
readonly VERMELHO='\e[31m'
readonly VERDE='\e[32m'
readonly AMARELO='\e[33m'
readonly AZUL='\e[34m'
readonly MAGENTA='\e[35m'
readonly NEGRITO='\e[1m'
readonly SEMCOR='\e[0m'