S
S
Sergey2019-10-15 22:07:35
linux
Sergey, 2019-10-15 22:07:35

Why doesn't it add a new element to echo?

Good afternoon, I wrote a simple script for downloading a file. The essence of the script is very simple - We set a link and at the time of downloading, we get the message "Download install script ...". If the file was successfully downloaded, "[OK]" should be added to the "Download install script..." line and the final line should look like "Download install script... [OK]". Otherwise, "[ERROR]" is output and the line is "Download install script... [ERROR]". Only instead, the line starts to look like this:
5da618babe98a129726079.png
Please tell me what's wrong, link to the script in GitHub: https://github.com/SeAnSolovev/autoinstall/blob/ma...
The script is written under Debian.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2019-10-15
@t3g1ng

I solved the problem, uploaded the working script to github.
1) The script must be run through bash and not through sh
2) In the echo line, you need to add -en (echo -en "Download install script... ")

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question