I created this script called ShellScript.sh, and in this script is as follows:#!/bin/sh# Shell script function help {  echo   echo ./ShellScript.sh {start | stat}  echo   echo These are some commands:  echo   # Start command  echo start  echo This starts the process  echo   # Stat command  echo stat  echo  abcxyz  echo }However, on the command line, when I type ./ShellScript.sh help, nothing happens. I've been trying to figure out this problem for a day now and am sure I'm missing something small but I don't know what it is!
Function doesn't execute in script
shell script
It's unclear what your final goal is, but calling ./ShellScript.sh help passes the parameter help to the script; as Arkadiusz Drabczyk commented, all that ShellScript.sh is doing is setting up a function, then exiting.It appears as though you are building up an option-driven script to start or stat a process, in which case you need some main-level code to parse the parameters and call the function(s).For example, add this to the end of your ShellScript.sh:case $1 instart)    echo This starts the process    ;;stat)    echo stat    echo  abcxyz    ;;help)    help    ;;*)    echo usage: $0 start|stat    ;;esacAs a suggestion, stat is really similar (to humans) to start; consider status instead?