If you are using GMT(Generic Mapping Tools) and still trying to run standalone GMT command, avoid writing gmt in the beginning of each command line. Try this. This is applicable for MAC users.
1. Go to GMT bin folder or type the following command in terminal (replace Xs with the GMT version number).
2. Once you are in this directory. Run the following command.
make sure you have added the GMT path in the .bash_profile
Print GMT path
now your old script will run in new GMT.