# Passing trailing text to output file

**URL:** <https://forum.generic-mapping-tools.org/t/passing-trailing-text-to-output-file/4198>\
**Category:** Q&A\
**Tags:** gmt\
**Created:** [August 23, 2023, 6:51pm UTC](https://forum.generic-mapping-tools.org/t/passing-trailing-text-to-output-file/4198 "2023-08-23T18:51:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wattsamattau](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/wattsamattau/32/3299_2.png) [@wattsamattau](https://forum.generic-mapping-tools.org/u/wattsamattau)\
**Post date:** [August 23, 2023, 6:51pm UTC](https://forum.generic-mapping-tools.org/t/passing-trailing-text-to-output-file/4198/1 "2023-08-23T18:51:46Z")

</div>

I have a data file that I want to perform math on using gmtmath. The format of the file is:  
X Y some\_text more\_text  
-317516 109061 high ms0334  
-317517 109062 low ms0334

I want to perform math on X and Y, ignore the text but move it to the output file. I tried the following, it performs math on X and Y, but deletes the text in the output file. What am I doing wrong?

gmt math -fi0x,1y,2:3s -fo0x,1y,2:3s file\_in 3600 DIV = file\_out

Result:  
138 30.3 0 0

---

<div class="post-metadata">

**Author:** ![pwessel](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/pwessel/32/30_2.png) [@pwessel](https://forum.generic-mapping-tools.org/u/pwessel)\
**Post date:** [August 24, 2023, 9:38am UTC](https://forum.generic-mapping-tools.org/t/passing-trailing-text-to-output-file/4198/2 "2023-08-24T09:38:58Z")

</div>

Thanks for this. We just never implemented it but the version in [master](https://github.com/GenericMappingTools/gmt/pull/7759) will now return the trailing text. See that link for some examples.
