nano script.sh
- Enter the following code to signify it's a shell script and to run a command:
#!/bin/sh
ls
- Make it executable with chmod: chmod 777 script.sh
- Run it with the sh command: sh script.sh
===== Schedule a Script on Mac =====
https://stackoverflow.com/questions/36854193/scheduling-a-terminal-command-or-script-file-to-run-daily-at-a-specific-time-mac