Errors Bash

1: !#/bin/bash: not found

Error

1: !#/bin/bash: not found

Occurs if you mix up ! and # in the first line of the script

Write correctly

#!/bin/bash

VAR: command not found

Error

VAR: command not found

Occurs if you confuse when assigning a variable value to put a space at the equal sign

Write correctly

VAR='https://eth1.ru'

Wrong to write

VAR = 'https://eth1.ru'

There should be no spaces around =.

↓ Bash articles ↓
Bash
Bash Scripting
-eq -gt …: Comparison operators
if else: Conditional operators
while loop
date
Newline
Arithmetic operations
Pass a file or password over SFTP in a Bash script

Article author: Andrei Olegovich