S
S
Sergey2019-02-12 20:20:44
bash
Sergey, 2019-02-12 20:20:44

Why does a script written in Bash refuse to work?

Good evening, I wrote a bash script for auto-installation.
I don't understand why it refuses to work.
The script itself posted on the poison. Because it doesn’t let it in here because there are a lot of characters
Link to the script: https://github.com/bbk96/autoinstall/blob/master/d...
Here is the log from the console:

: not foundh: 2: deb7.auto.sh:
: not foundh: 7: deb7.auto.sh:
: No such file7: deb7.auto.sh: cannot open /tmp/log.pipe.3016
: Interrupted system callo.sh: cannot create /tmp/log.pipe.3016

Answer the question

In order to leave comments, you need to log in

2 answer(s)
J
jcmvbkbc, 2019-02-12
@t3g1ng

Good evening, I wrote a bash script for auto-installation.

/bin/sh may not be bash.
Scripts can be debugged:#!/bin/bash -ex

C
Caretaker, 2019-02-21
@zuart

Try to solve the problem "on the forehead", with bash it very often helps to understand the reason - just copy-paste (taking into account the variables, of course) perform all operations in the console and check the result. It only seems to be complicated and time-consuming - but in fact it will be faster than waiting for someone else to do it, besides, such code that is "debugged" in a virtual machine, at least, few people want to check .. On
one of the teams you will catch the problem and understand how to solve it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question