Raspberry pie Linux sh script file function error: not found

contact with raspberry pie script file for the first time, this is downloaded on github, why report not found"s fault?

function install_module {         -sharp 
  src=$1
  mod=$2

  if [[ -d /var/lib/dkms/$mod/$ver/$marker ]]; then    -sharp 
    rmdir /var/lib/dkms/$mod/$ver/$marker
  fi

  if [[ -e /usr/src/$mod-$ver || -e /var/lib/dkms/$mod/$ver ]]; then   -sharp 
    dkms remove --force -m $mod -v $ver --all
    rm -rf /usr/src/$mod-$ver
  fi
  mkdir -p /usr/src/$mod-$ver
  cp -a $src/* /usr/src/$mod-$ver/
  dkms add -m $mod -v $ver
  dkms build $kernels -m $mod -v $ver && dkms install --force $kernels -m $mod -v $ver

  mkdir -p /var/lib/dkms/$mod/$ver/$marker
}

install_module "./" "seeed"

error:


./install.sh: 30: ./install.sh: function: not found
./install.sh: 34: ./install.sh: [[: not found
./install.sh: 38: ./install.sh: [[: not found
./install.sh: 38: ./install.sh: -e: not found

ask others, it seems that the execution of script files in different versions of linux is different, or there is no need to write function, but I also try to delete function, but I still report an error and ask the boss for advice

Dec.03,2021

scripts are compatible with specific shell versions. You need to know your shell version first.

echo $SHELL

if your script is compatible / bin/bash you can declare

on the first line of the script.
-sharp!/bin/bash

-sharpyour code below
echo "hello"

if you want to know which shell, the system supports, you can try

$ cat /etc/shells
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e42031-4cd1b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e42031-4cd1b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?