Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Subscribe to our newsletter

Advertise on LowEndTalk.com

Latest LowEndBox Offers

    Bash script - bad substitution error
    New on LowEndTalk? Please read our 'Community Rules' by clicking on it in the right menu!

    Bash script - bad substitution error

    So I wanted to do a bash script but whenever I run it I get "bad substitution" error. I have already browsed stackoverflow and tried some solutions (such as making sure #!bin/bash is at the top and to execute using sh command) but none worked :/
    Any ideas?

     #!/bin/bash
    printf "Hello. This is an OTS setup script provided by Damon at Otland. Please standby as user input may be required."
    read -r -p "Do you want to install the webpanel? [Y/n]" response
     response=${response,,} # tolower
     if [[ $response =~ ^(yes|y| ) ]]; then
        wget https://raw.githubusercontent.com/NicolasLoew/vps/master/panelsetup.sh
        sh panelsetup.sh
     fi
     printf "If you installed webpanel please navigate to http://yourip:2004/ and follow install instructions."
     printf "Once you have installed the webpanel login and go to Enduser-->Configuration-->Apache and delete everything in the config and replace it with https://raw.githubusercontent.com/NicolasLoew/vps/master/apacheconfig. This will be needed for Znote later."
    read -r -p "Do you want to compile latest TFS? [Y/n]" response
     response=${response,,} # tolower
     if [[ $response =~ ^(yes|y| ) ]]; then
        wget https://raw.githubusercontent.com/NicolasLoew/vps/master/tfsauto.sh
        sh tfsauto.sh
     fi
     printf "You have successfully compiled TFS! You can start it by going to cd forgottenserver and execute ./tfs. Dont forget to configure config.lua though. You can create database in webpanel-->enduser."
     read -r -p "Do you want to install ZnoteAAC? [Y/n]" response
     response=${response,,} # tolower
     if [[ $response =~ ^(yes|y| ) ]]; then
      wget https://raw.githubusercontent.com/NicolasLoew/vps/master/znotesetup.sh
      sh znotesetup.sh  
     fi
    printf "You havee successfully setup ZnoteAAC. Navigate to http://yourip and follow the instructions."
    

    Comments

    Sign In or Register to comment.