# Variable list syntax

**URL:** <https://community.openpbs.org/t/variable-list-syntax/1875>\
**Category:** Users/Site Administrators\
**Created:** [November 26, 2019, 12:20pm UTC](https://community.openpbs.org/t/variable-list-syntax/1875 "2019-11-26T12:20:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sprothero](https://avatars.discourse-cdn.com/v4/letter/s/87869e/32.png) [@sprothero](https://community.openpbs.org/u/sprothero)\
**Post date:** [November 26, 2019, 12:20pm UTC](https://community.openpbs.org/t/variable-list-syntax/1875/1 "2019-11-26T12:20:08Z")

</div>

I’m trying to run a job and pass three variables to the script, the man page says to use a comma separated list, but when I try this, I just get the usage message returned - what am I missing?  
The command I’m trying to run is:  
qsub -v JNAME=fred, INAME=a2, WORK\_DIR=`pwd` check.qsub

It’s OK if I just try one variable, but fails once I try two or more.

(I’m running on RHEL 7.4).

---

<div class="post-metadata">

**Author:** ![vstumpf](https://avatars.discourse-cdn.com/v4/letter/v/dbc845/32.png) [@vstumpf](https://community.openpbs.org/u/vstumpf)\
**Post date:** [November 26, 2019, 6:51pm UTC](https://community.openpbs.org/t/variable-list-syntax/1875/2 "2019-11-26T18:51:07Z")

</div>

I believe you’re not supposed to add spaces, it should look like:

```auto
qsub -v JNAME=fred,INAME=a2,WORK_DIR="`pwd`" check.qsub

```

I’ve added quotes around pwd, just incase there are spaces in the output of the command.

---

<div class="post-metadata">

**Author:** ![speleolinux](https://avatars.discourse-cdn.com/v4/letter/s/779978/32.png) [@speleolinux](https://community.openpbs.org/u/speleolinux)\
**Post date:** [October 20, 2022, 1:30am UTC](https://community.openpbs.org/t/variable-list-syntax/1875/3 "2022-10-20T01:30:50Z")

</div>

Hi

I was just having the same problems and this post solved it.  
The PBS Professional 2021.1 User’s Guide UG-21 clearly shows spaces in all their examples which is incorrect. Thanks Sharon for posting and thanks Vincent for the solution.

Mike
