GMT command prompt in Windows 10

Added by Osman 13 days ago

Hi everybody,

I used to use GMT in my Linux but had to move to Windows.

I used to run a file .gmt in linux. But as far as I see .bat has to be the extension for windows GMT command prompt.

Here is the code I have been using and there is a file with fault coordinates for psxy.

What can I do to run this file in Windows.

When I run this code in yerbulduru_win.bat file

pscoast -R25/30/39/42 -JM15c -G100 -S255 -B1f0.5g0.5 -Df -W3 -Ia/0/0/255 -Na/255/0/0 -Lf29/41.8/27/40/100k -X5 -Y5 -K >

echo " 41 29 " | psxy -R -JM -Sa1.0 -W3 -G255/0/0 -O -K -: >>

pscoast -R23/44/35/44 -JM4.5c -G0 -S255 -Di -W1 -X0.1 -Y9 -O -K >>

psxy -R -JM -W5/0/255/0 -A -O -K <<END>>
23 35
23 44
44 44
44 35
23 35

psxy -R -JM -W15/0/0/255 -O -K <<SON>>
25 39
25 42
30 42
30 39
25 39

psxy mta_emme_fault_map.gmt -R -JM$scl -O -K -W1.1p,black >>

echo " 41 29 " | psxy -R -JM -Sa0.5 -W3 -G255/0/0 -O -K -: >>

I see this result in command prompt and the is in the attachments without fault lines on it.

c:\Users\osman\Desktop\Thesis Draw>yerbulduru_win.bat

c:\Users\osman\Desktop\Thesis Draw>pscoast -R25/30/39/42 -JM15c -G100 -S255 -B1f0.5g0.5 -Df -W3 -Ia/0/0/255 -Na/255/0/0 -Lf29/41.8/27/40/100k -X5 -Y5 -K 1>

c:\Users\osman\Desktop\Thesis Draw>echo " 41 29 " | psxy -R -JM -Sa1.0 -W3 -G255/0/0 -O -K -: 1>>

c:\Users\osman\Desktop\Thesis Draw>pscoast -R23/44/35/44 -JM4.5c -G0 -S255 -Di -W1 -X0.1 -Y9 -O -K 1>>
<< was unexpected at this time.
c:\Users\osman\Desktop\Thesis Draw>psxy -R -JM -W5/0/255/0 -A -O -K <<OS>>
c:\Users\osman\Desktop\Thesis Draw>

If anyone could help me, would be great !

Thanks in advance..


as below :

Replies (1)

RE: GMT command prompt in Windows 10 - Added by Joaquim 13 days ago

There are countless alternatives to run bash and unix commands on Windows (MinGW, UnixUtils, busybox, ConEmu, Cygwin, etc ...) but the batch files (that I find very handy for simple scripts) have a more limited (and different) syntax. For example things like

... <<END>> ...

are not valid, and

echo " 41 29 "

have no quotes in batch files.