D
D
Denis2018-09-23 02:01:06
bash
Denis, 2018-09-23 02:01:06

Script problems. Where is the mistake?

Good evening!
I'm trying to run a script for a telegram bot on a free hosting. Tell me what's wrong?
What to write in line number 6? how to correctly specify the path to the file.list
link to your site and the site where the files are located are different, what to indicate?

!/usr/bin/env bash

https://имя.000webhostapp.com/
https://t.me/имя

chmod +x /имя.sh
botToken="токенбота";
channelId="-айдиканала";
channelName="@имяканала";
postImage=sort --random-sort /tpm/ИмяОткудаБрать.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" /tpm/ИмяОткудаБрать.list;

exit 0;

Screenshots are attached below.
unknown.pngunknown.png?width=715&height=269

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2018-09-24
@kRosis

Fix it at least

#!/usr/bin/env bash

#https://имя.000webhostapp.com/
#https://t.me/имя

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question