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
#!/bin/bash
# Lê arquivo.
conteudo=$(< arq1.yaml)
# variável.
var='shellscriptx@gmail.com'
# Lê o contéudo enquanto houver variáveis.
# Ex: ${var1}, ${var2} ...

1. curl + sed

$ curl -sL https://www.python.org | sed -nr 's/^<p>Latest:[^>]+>Python\s+([0-9]+(.[0-9]+)+).+/\1/p'

2. curl + grep

$ curl -sL https://www.python.org | grep '^<p>Latest:' | grep -oP '(?<=Python )[0-9]+(.[0-9]+)+'
#!/bin/bash
# Importando API
source ShellBot.sh
# Token do bot
bot_token='<TOKEN_AQUI>'
# Inicializando o bot
ShellBot.init --token "$bot_token" --monitor --flush
#!/bin/bash
# Importando API
source ShellBot.sh
# Token do bot
bot_token='<TOKEN_AQUI>'
# Inicializando o bot
ShellBot.init --token "$bot_token" --flush --monitor --return map
#!/bin/bash
# Importando API
source ShellBot.sh
# Token do bot
bot_token='<TOKEN_AQUI>'
# Inicializando o bot
ShellBot.init --token "$bot_token" --monitor --flush
@shellscriptx
shellscriptx / bot.sh
Last active February 4, 2019 20:02
bot_service_regras
#!/bin/bash
# Importando API
source ShellBot.sh
# Token do bot
bot_token='<TOKEN_AQUI>'
# Inicializando o bot
ShellBot.init --token "$bot_token" --monitor --flush

ZABBIX.SH

CONTRIBUA

Se você possui conhecimentos na ferramenta Zabbix e gostaria de contribuir na construção da biblioteca no projeto bashsrc, leia a documentação a seguir.

SOBRE

A biblioteca zabbix.sh será constituída por uma coleção de funções que irão integrar os métodos da API oficial