I created a couple of custom bash scripts that does some simple things like starting and stopping a PostgresSQL server. I have them stored in a specific directory of my choice.
Joes-MacBook-Pro:scripts joe$ l
total 24
-rwxr-xr-x 1 joe staff 124B Apr 18 21:22 pgstart
-rwxr-xr-x 1 joe staff 114B Apr 18 21:23 pgstatus
-rwxr-xr-x 1 joe staff 123B Apr 18 21:22 pgstop
Joes-MacBook-Pro:scripts joe$ pwd
/Users/joe/Softwares/scripts
I have even referenced these scripts in my .bash_profile as:
# Custom Scripts
export SCRIPTS_HOME=/Users/joe/Softwares/scripts
Now when I tried to use it as:
Joes-MacBook-Pro:~ postgres$ pgstart
-bash: pgstart: command not found
Should I place this script in the /bin/ directory on my Mac? Any clues?
#!/bin/bashas the first line? Do they work when you type/Users/joe/Softwares/scripts/pgstartrather than justpgstart?