Culling data based on coastlines in GMT

This is a problem that took me way too long to figure out, but it is a simple one line command. The problem arose as I was taking a finite fault solution for the Kaikoura earthquake from a different author and forward modeling the surface displacements onto a set grid of points (in my case, either 10, 20 or 40 km). From there, I wanted to invert for a possible slip model based on this new grid of 'synthetic' GPS stations, therefore, I had to exclude any stations/grid points over water. The solution for this is the gmtselect command, and its used as follows: Since my data was in a separate file (with columns lon, lat, east, north, up), I first start with the awk command within my bash script awk '{print $1, $2, $3, $4, $5}' file.txt I then add on the gmtselect command awk '{print $1, $2, $3, $4, $5}' file.txt | gmtselect -R -Di -Ns/k/s/k/s > subset.txt See, easy. The culled solutions are now in the file 'subset.txt' with the same column order...