Answer the question
In order to leave comments, you need to log in
What is the bash syntax error?
Hello!
Delivered yesterday on Ubuntu Server 16.04 + Apache virtualka.
I downloaded a script for managing hosts from here , but bash swears at everything: a semicolon at the end of a line, empty lines, and in general. Now case
I started looking at everything separately, from the very beginning:
Code for the test:
#!/bin/bash
projects="/home/user/www"
hosts="/etc/apache2/sites-available"
enabled_hosts="/etc/apache2/sites-enabled"
user=$(whoami)
action=$1
name=$2
db=$3
case $action in
add)
echo "Добавить"
;;
del)
echo "Удалить"
;;
*)
echo "Введено неправильное действие"
esac
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