'for: command no found'

Hi! I am trying to make a for loop in gmt modern version and I am getting: “for command not found”, “done command no found” and so on.
My script is more or less something like this:
set variable1=2
set variable2=10
set …
set …
set …

gmt begin isolines pdf
gmt commands …

for i in 0.2 1 2; do echo “$i C” >> positive.txt; done
gmt grdcontour dist_vs_depth.grd -Cpositive.txt -W2p,blue
for i in -0.2 -1 -2; do echo “$i C” >> negative.txt; done
gmt grdcontour dist_vs_depth.grd -Cnegative.txt -W2p,red

gmt end show

Someone know what could be the source of the error?

Thanks in advance!

Given the errors, perhaps you are mixing csh syntax and bash syntax, and how are you running the script? As a csh or as a bash script?

Thank you Paul for your fast reply!
The shebang start with #!/bin/csh, but I was running bash script_name maybe this is the mistake!

Yep, run with csh instead