Hi all, I use the Version 6.4 of GMT with Mac OS 12.5 Monterey. When I run the code of the file "myplot.sh” like the code below in VS code, it will return to the results-- gmt: command not found. However, it works when I run the bash file in my own terminal. What’s going on, why doesn’t it recognise gmt commands?
#Code for myplot.sh
#!/usr/bin/env -S bash -e
#GMT modern mode bash template
#Date: 2022-10
#User: M***
#Purpose: Purpose of this script
export GMT_SESSION_NAME=$$ # Set a unique session name
gmt begin figurename png
gmt coast -Rg -JH15c -Gpurple -Baf -B+t"Kang First Plot" # Place modern session commands here
gmt end show
Outcome
MacBook-Pro-3:GMT Mike$ bash myplot.sh
myplot.sh: line 7: gmt: command not found
myplot.sh: line 8: gmt: command not found
myplot.sh: line 9: gmt: command not found
please help me out,
Best regards.