GMT Command not found error in Shell script


I have installed GMT, and I am trying to run a shell script with GMT commands inside. However, I am getting an error with GMT commands, for example:

makecpt: Command not found, gmtset MEASURE_UNIT inch
gmtset: Command not found.
gmtset PAPER_MEDIA A4+
gmtset: Command not found.

I ran in the terminal gmt makecpt … and it works, but when running with the shell script I get the Command not found errors. Someone could help me?

Thanks in advance!

You probably need to prepend “gmt” before the commands (in the script)

Hi Rafa!! Welcome to the GMT forum.

Could you tell us what GMT version do you install, how and in which Operating system?

I am using GMT version 6.3.0 on Ubuntu!

Thanks in advance!

I suspect that might be an issue related to the path. See this link:

Thank you! I will have a look!!