Answer the question
In order to leave comments, you need to log in
What is it written on?
Good afternoon!
There are several questions
1) what language is it written in?
#!/usr/bin/env bash
botToken="414612848:AAGs2pMUNCDIQIrHrABU8xYXGxXVzPcRSrI";
channelId="-1013332055484";
channelName="@superchannel";
postImage=`sort --random-sort /opt/telegram/superchannel/food.url.list | head -n 1`
wget -q -O /dev/null "https://api.telegram.org/bot$botToken/sendPhoto?chat_id=$channelId&photo=$postImage&caption=$channelName&disable_notification=1"
removeImage=`echo $postImage | cut -d "/" -f 6`;
sed -i "/$removeImage/d" /opt/telegram/superchannel/food.url.list;
exit 0;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question