Artificial intelligent assistant

Syntax error when executing web script via curl or wget I don't understand what's wrong. When executing a `bash` script via `wget` or `curl` the script aborts with a syntax error. Although it works if downloaded and executed as a local file `bash script.sh`. wget -O- | bash curl | bash **Error:** bash: line 114: syntax error near unexpected token "fi" This is the code: ... while [[ ! $db_database ]]; do echo read -p "MySQL Database: " db_database done if [[ -z $db_prefix ]]; then echo read -p "MySQL Table Prefix [lc_]: " db_prefix if [[ ! $db_prefix ]]; then db_prefix="lc_" fi # <-- This is the line, 114 fi if [[ -z $db_collation ]]; then echo read -p "MySQL Collation [utf8_swedish_ci]: " db_collation if [[ ! $db_collation ]]; then db_collation="utf8_swedish_ci" fi fi ...

The problem is the `read` which expects to read from stdin, and that fails when you're piping (it fails to read what you are expecting to read and instead reads the text of the actual script, which is being piped in on standard input, causing the syntax error by effectively deleting the line after the `read` statement from the script). So use command substitution instead to execute the contents inline:


bash -c "$(curl


Or


bash -c "$(wget -O-

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 9fc6269c12aad9c6c82e0b3efc0d2e5d