# Define a variable in the environment section which ends in a space

**URL:** https://cylc.discourse.group/t/define-a-variable-in-the-environment-section-which-ends-in-a-space/521
**Category:** Cylc Development
**Created:** [August 17, 2022, 3:44am UTC](https://cylc.discourse.group/t/define-a-variable-in-the-environment-section-which-ends-in-a-space/521 "2022-08-17T03:44:56Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![TomC](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/tomc/32/115_2.png) [@TomC](https://cylc.discourse.group/u/TomC)
#### Post date: [August 17, 2022, 3:44am UTC](https://cylc.discourse.group/t/define-a-variable-in-the-environment-section-which-ends-in-a-space/521/1 "2022-08-17T03:44:56Z")

</div>

Is there a way in the Cylc [environment] section to have a variable end in a space? I haven’t checked Cylc8, but in Cylc7, if I do something like

```auto
[environment]
    _ = " "

```

The space is not respected, instead Cylc trims the variables and provides `_=""` in the job script. I was wondering if there was a way to override this behaviour?

---

<div class="post-metadata">

### Author: ![TomC](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/tomc/32/115_2.png) [@TomC](https://cylc.discourse.group/u/TomC)
#### Post date: [August 17, 2022, 4:37am UTC](https://cylc.discourse.group/t/define-a-variable-in-the-environment-section-which-ends-in-a-space/521/2 "2022-08-17T04:37:30Z")

</div>

I can work around this by something like `_ = " \0"`, but that is a bit clunky.

---

<div class="post-metadata">

### Author: ![hilary.j.oliver](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/hilary.j.oliver/32/4_2.png) [@hilary.j.oliver](https://cylc.discourse.group/u/hilary.j.oliver)
#### Post date: [August 17, 2022, 4:54am UTC](https://cylc.discourse.group/t/define-a-variable-in-the-environment-section-which-ends-in-a-space/521/3 "2022-08-17T04:54:21Z")

</div>

> [@TomC](#):
>
> Is there a way in the Cylc [environment] section to have a variable end in a space?

Hmm, I think not. Seems like an omission, since the shell allows that. Do you want to post a bug report on GitHub?

---

<div class="post-metadata">

### Author: ![TomC](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/tomc/32/115_2.png) [@TomC](https://cylc.discourse.group/u/TomC)
#### Post date: [August 17, 2022, 6:21am UTC](https://cylc.discourse.group/t/define-a-variable-in-the-environment-section-which-ends-in-a-space/521/4 "2022-08-17T06:21:41Z")

</div>

Done, [Variables defined in environment cannot have trailing spaces · Issue #5080 · cylc/cylc-flow · GitHub](https://github.com/cylc/cylc-flow/issues/5080)
