Run a bash script and have a main() function like in C. May 23, 2023 by John Cartwright How to run a bash function when a script runs. This is just like the main() function in C.