#!/bin/bash function sendTelegram { local TEXT=$1 local SERVER="K0" #local MESSAGE=$2 #[[ ! -z "$MESSAGE" ]] && \ curl -s -X POST $URL -d chat_id=$CHAT_ID -d text="*${SERVER}*: $TEXT" -d parse_mode="markdown" >> /tmp/telegram.log } TOKEN= CHAT_ID= MESSAGE="Hello World" URL="https://api.telegram.org/bot$TOKEN/sendMessage" sendTelegram "testing _markdown_ [enlace](https://miguelangel.torresegea.es/wiki)"