# GMT 5.4.4 Append not working in Linux

**URL:** <https://forum.generic-mapping-tools.org/t/gmt-5-4-4-append-not-working-in-linux/2094>\
**Category:** Q&A\
**Created:** [September 15, 2021, 1:35pm UTC](https://forum.generic-mapping-tools.org/t/gmt-5-4-4-append-not-working-in-linux/2094 "2021-09-15T13:35:17Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![EQlab](https://avatars.discourse-cdn.com/v4/letter/e/df788c/32.png) [@EQlab](https://forum.generic-mapping-tools.org/u/EQlab)\
**Post date:** [September 15, 2021, 1:35pm UTC](https://forum.generic-mapping-tools.org/t/gmt-5-4-4-append-not-working-in-linux/2094/1 "2021-09-15T13:35:17Z")

</div>

I’m new GMTuser. Running gmt in CentOS Linux

I’m following the tutorial for GMT5.4.4  
[Tutorial Link](http://gmt.soest.hawaii.edu/doc/5.4.4/GMT_Tutorial.html)  
I prepared the script with this command from the tutorial.

gmt psxy @y.txt -R0/6/0/6 -Jx1i -Baf -P -K -Wthinner \> y.ps  
gmt psxy y.txt -R -J -O -W -Si0.2i \>\> y.ps

y.txt is below  
1 1  
2 3  
2 5  
3 2  
4 4  
5 2

I keep on getting two files with same name but the other has question mark in the end  
y.ps  
y.ps?

![image](https://canada1.discourse-cdn.com/flex047/uploads/gmt/original/2X/4/4032dbcf2a62dc77220f9f788fb8ab23e3476f0c.png)

both the files didn’t show the expected result.  
but when I run the command per line it’s working. But whenever I try to append new command to the existing figure I get a file with a question mark at the end.

I would like to make multiple lines of command but 2lines of command is not working in my environment, I can’t figure out  
do you have an idea how to solve this?

---

<div class="post-metadata">

**Author:** ![Esteban82](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/esteban82/32/54_2.png) [@Esteban82](https://forum.generic-mapping-tools.org/u/Esteban82)\
**Post date:** [September 15, 2021, 2:10pm UTC](https://forum.generic-mapping-tools.org/t/gmt-5-4-4-append-not-working-in-linux/2094/2 "2021-09-15T14:10:42Z")

</div>

Hi EQlab!! Welcome to the GMT forum.

I don’t anything weird in your commands. Maybe the @ in @y.txt.

What GMT version are you using? The latest version is 6.2. If you can, I would suggest you to use 6.2 and use the modern syntax, If is much simpler.  
https://docs.generic-mapping-tools.org/latest/tutorial.html

---

<div class="post-metadata">

**Author:** ![EQlab](https://avatars.discourse-cdn.com/v4/letter/e/df788c/32.png) [@EQlab](https://forum.generic-mapping-tools.org/u/EQlab)\
**Post date:** [September 15, 2021, 2:26pm UTC](https://forum.generic-mapping-tools.org/t/gmt-5-4-4-append-not-working-in-linux/2094/3 "2021-09-15T14:26:00Z")

</div>

Hi! Thank you for your reply. I am using a laboratory server with newly installed gmt5.4.4 version. I don’t have access to the installation option on the server. But I will consider that if I cant find a solution

Thank you for your help

---

<div class="post-metadata">

**Author:** ![Esteban82](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/esteban82/32/54_2.png) [@Esteban82](https://forum.generic-mapping-tools.org/u/Esteban82)\
**Post date:** [September 15, 2021, 2:33pm UTC](https://forum.generic-mapping-tools.org/t/gmt-5-4-4-append-not-working-in-linux/2094/4 "2021-09-15T14:33:43Z")

</div>

You are welcome. I suspect an issue server. If I were you, I will try to find the way to upgrade GMT. If you want to learn GMT, it is not good to learn and old version (5.4.4 is from sep-2018). Maybe you can [try it online](https://github.com/GenericMappingTools/try-gmt)?

---

<div class="post-metadata">

**Author:** ![PlanetGus](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/planetgus/32/303_2.png) [@PlanetGus](https://forum.generic-mapping-tools.org/u/PlanetGus)\
**Post date:** [September 15, 2021, 3:48pm UTC](https://forum.generic-mapping-tools.org/t/gmt-5-4-4-append-not-working-in-linux/2094/5 "2021-09-15T15:48:55Z")

</div>

Not that it’s a “good” workaround, but you likely can use your own install on the server with conda (or miniconda).

```auto
conda create -n gmt
source activate gmt
conda install gmt=5.4.4 --channel conda-forge

```

assuming you actually have conda…

---

<div class="post-metadata">

**Author:** ![EJFielding](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/ejfielding/32/82_2.png) [@EJFielding](https://forum.generic-mapping-tools.org/u/EJFielding)\
**Post date:** [September 15, 2021, 4:03pm UTC](https://forum.generic-mapping-tools.org/t/gmt-5-4-4-append-not-working-in-linux/2094/6 "2021-09-15T16:03:09Z")

</div>

Are you writing a file with the set of GMT commands and trying to run that? How are you running it?

---

<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:** [September 15, 2021, 8:27pm UTC](https://forum.generic-mapping-tools.org/t/gmt-5-4-4-append-not-working-in-linux/2094/7 "2021-09-15T20:27:13Z")

</div>

The questionmark etc makes we wonder if you are using a rich-text editor to make those script and run them. Such files will have formatting hidden characters and that would explain the troubles.

---

<div class="post-metadata">

**Author:** ![EQlab](https://avatars.discourse-cdn.com/v4/letter/e/df788c/32.png) [@EQlab](https://forum.generic-mapping-tools.org/u/EQlab)\
**Post date:** [September 16, 2021, 5:14am UTC](https://forum.generic-mapping-tools.org/t/gmt-5-4-4-append-not-working-in-linux/2094/8 "2021-09-16T05:14:38Z")

</div>

yes. I write the commands in a notepad using Windows PC, then saved it with a .sh file format. Then, transfer the file to the server and run it in server terminal using “bash 1.sh”.

---

<div class="post-metadata">

**Author:** ![EQlab](https://avatars.discourse-cdn.com/v4/letter/e/df788c/32.png) [@EQlab](https://forum.generic-mapping-tools.org/u/EQlab)\
**Post date:** [September 16, 2021, 5:20am UTC](https://forum.generic-mapping-tools.org/t/gmt-5-4-4-append-not-working-in-linux/2094/9 "2021-09-16T05:20:46Z")

</div>

Thank you! This might be the issue. I used the built-in notepad on Windows PC, I also try Notepad++ to prepare the .sh file. What program should I use to prepare the .sh file?

---

<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:** [September 16, 2021, 9:37am UTC](https://forum.generic-mapping-tools.org/t/gmt-5-4-4-append-not-working-in-linux/2094/10 "2021-09-16T09:37:02Z")

</div>

NotePad++ might work, or Visual STudio Code.

---

<div class="post-metadata">

**Author:** ![EQlab](https://avatars.discourse-cdn.com/v4/letter/e/df788c/32.png) [@EQlab](https://forum.generic-mapping-tools.org/u/EQlab)\
**Post date:** [September 16, 2021, 11:31am UTC](https://forum.generic-mapping-tools.org/t/gmt-5-4-4-append-not-working-in-linux/2094/11 "2021-09-16T11:31:08Z")

</div>

Thank you Sir. I’m using Notepad++ now. I will try the Visual Studio Code. Thank you again! It really helps to have this forum

---

<div class="post-metadata">

**Author:** ![EJFielding](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/ejfielding/32/82_2.png) [@EJFielding](https://forum.generic-mapping-tools.org/u/EJFielding)\
**Post date:** [September 16, 2021, 9:51pm UTC](https://forum.generic-mapping-tools.org/t/gmt-5-4-4-append-not-working-in-linux/2094/12 "2021-09-16T21:51:22Z")

</div>

I have not used Windows PC editors much, but it is always safer to write Linux scripts using a Linux editor such as “vi” to avoid any special characters being included. On the Mac, there is usually an option to “save as plain text” that removes most special formatting.

---

<div class="post-metadata">

**Author:** ![EQlab](https://avatars.discourse-cdn.com/v4/letter/e/df788c/32.png) [@EQlab](https://forum.generic-mapping-tools.org/u/EQlab)\
**Post date:** [September 21, 2021, 2:24am UTC](https://forum.generic-mapping-tools.org/t/gmt-5-4-4-append-not-working-in-linux/2094/13 "2021-09-21T02:24:17Z")

</div>

Issue is solved. I used Sakura Editor to prepare scripts and textfiles. Thank you all for your help!!
