D
D
Denis2018-09-23 00:19:04
Programming languages
Denis, 2018-09-23 00:19:04

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;

2) in what format it is better to save it?
3)Will it work in CRON?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
DevMan, 2018-09-23
@HighwayToCode

1) bash
2) ???
3) will

T
Toopie, 2018-09-23
@Toopie

then bash most likely

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question