How to use psmeca command more than one times?

How could I use one command (e.g. psmeca) more than 1 times? For example I have two .txt files . I am using the folllowing commands

in order to plot focal mechanism from both files but I see only the focal mechanisms of the first command (that reads the one file)

gawk “{ print $4,$3,0,$7,$8,$9,1.5, $4,$3}” new_1.txt | psmeca -JM16 -R -Sa1.6/21/0.02 -G0/0/0 -L -O -C -V >> DE.ps

gawk “{ print $4,$3,0,$7,$8,$9,1.5, $4,$3}” new_2.txt | psmeca -JM16 -R -Sa1.6/21/0.02 -G0/0/0 -L -O -C -V >> DE.ps

Could you please help me?

Thanking you in advance

It’s because you’re incorrectly using -K and -O options. For the first plotting command, you need to use -K only; for overlays, use -K and -O; for the last plotting command, use -O only.

my first command does not include -K

gawk “{ print $4,$3,0,$7,$8,$9,1.5, $4,$3}” new_1.txt | psmeca -JM16 -R -Sa1.6/21/0.02 -G0/0/0 -L -O -C -V >> DE.ps

How could I solve it?

Is it not possible to use a wildcard in gawk to use both files?
Something like and *??
gawk “{ print $4,$3,0,$7,$8,$9,1.5, $4,$3}” new_*.txt | psmeca -JM16 -R -Sa1.6/21/0.02 -G0/0/0 -L -O -C -V >> DE.ps

Are those two commands your full script?

my full script is

makecpt -Cglobe -T-5000/5000/100 -V > rlf.cpt

gmtset ANOT_FONT_SIZE 400
gmtset ANNOT_FONT_SIZE_PRIMARY 14
gmtset ANOT_OFFSET 1.5
gmtset LABEL_FONT_SIZE 20
gmtset DEGREE_FORMAT 5
gmtset FRAME_WIDTH 0.15
gmtset TICK_LENGTH 0.2
gmtset DOTS_PR_INCH 400
gmtset MAP_SCALE_HEIGHT 0.4

psbasemap -JM16 -R18/30/33.5/42 -Lf20.0/34.5/34.6/100 -Bf3a3 -K -O -V >> DE.ps

pscoast -JM16 -R18/30/33.5/42 -B1f1 -Glightbrown -Sdodgerblue -Df -N1/0.8p,- -W0.5p,black -X1.5 -V -Lf28/34.7/34.7/200+l -P -K > DE.ps

gawk “{ print $4,$3,0,$7,$8,$9,1.5, $4,$3}” new_1.txt | psmeca -JM16 -R -Sa1.6/21/0.02 -G0/0/0 -L -O -C -V >> DE.ps

gawk “{ print $4,$3,0,$7,$8,$9,1.5, $4,$3}” new_2.txt | psmeca -JM16 -R -Sa1.6/21/0.02 -G0/0/0 -L -O -C -V >> DE.ps

I would like to have two separate command psmeca

Could you please help me?

You need to read the cookbook on the use of -O -K. First command needs -O, middle commands need -O -K, final command needs -K.
You are using pretty old GMT 3 syntax as well. You will benefit a lot from moving to GMT 6 syntax and modern mode.