adbathyqc.grd: Title: surface
adbathyqc.grd: Command: surface adbathyqc.xyz -R-92:06/-91:53/28:02/28:08 -I0.25c/0.25c -Gadbathyqc.grd -V
adbathyqc.grd: Remark:
adbathyqc.grd: Normal node registration used
adbathyqc.grd: grdfile format # 0
adbathyqc.grd: x_min: -92.1 x_max: -91.8833 x_inc: 6.94444e-05 units: user_x_unit nx: 3121
adbathyqc.grd: y_min: 28.0333 y_max: 28.1333 y_inc: 6.94444e-05 units: user_y_unit ny: 1441
adbathyqc.grd: z_min: -112.58 z_max: -60.9849 units: user_z_unit
adbathyqc.grd: scale_factor: 1 add_offset: 0
What I want to do is match the -R part of the second line (in this case, -R-92:06/-91:53/28:02/28:08), and use it as a variable in a shell script. I think I could do this with sed, but I don't have my trusty sed/awk manual with me right now. Apparently, this sort of thing can be done in Perl, but I don't know Perl, and don't have time to learn it at the moment.
So some sort of shell script subroutine is what I need. Anyone got any pointers or ideas?


