# "Run Process" with arguments spanning multiple lines

**URL:** <https://forum.robotframework.org/t/run-process-with-arguments-spanning-multiple-lines/1946>\
**Category:** Standard Libraries\
**Created:** [15 June 2021 18:18 UTC](https://forum.robotframework.org/t/run-process-with-arguments-spanning-multiple-lines/1946 "2021-06-15T18:18:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![steve](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/steve/32/638_2.png) [@steve](https://forum.robotframework.org/u/steve)\
**Post date:** [15 June 2021 18:18 UTC](https://forum.robotframework.org/t/run-process-with-arguments-spanning-multiple-lines/1946/1 "2021-06-15T18:18:59Z")

</div>

I’m using the Process Library to call a utility, grpcurl. It works OK, but the lines are very long due to the `-d` (data) option and I am wondering if there is a way to split the command, or use line continuation ("…")

I have tried:

- 3 dots starting at column 1 “…” immediately followed by my args
- 3 dots starting at column 1 “…” followed by two spaces and then my args
- Split Command Line
- Catenate

None of them work the way I had hoped.

My goal is to take a very long line, like this:

```
${result}= Run Process grpcurl -d { "record" : { "f1":"valueforf1", "f2":"valueforf2", "f3": "srawlins@zebra.com", "f4": "Rawlins", "f5": "Steve", "generated_url" : "${url}"}} -plaintext ${service_address}:8080 svc.MyService.CreateMethod stdout=stdout.txt stderr=stderr.txt 

```

and make it more legible by spanning several lines.

But I have found this goal, which I consider to be rather simple, impossible to achieve.

An alternate form of grpcurl data ("-d") input is to supply it immediately, via standard-input, and then use:

```
-d @

```

which tells the utility that the data is coming from stdin vs the command argument itself.

I’m using the grpcurl from [GitHub - fullstorydev/grpcurl: Like cURL, but for gRPC: Command-line tool for interacting with gRPC servers](https://github.com/fullstorydev/grpcurl)

---

<div class="post-metadata">

**Author:** ![damies13](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/damies13/32/623_2.png) [@damies13](https://forum.robotframework.org/u/damies13)\
**Post date:** [15 June 2021 23:32 UTC](https://forum.robotframework.org/t/run-process-with-arguments-spanning-multiple-lines/1946/2 "2021-06-15T23:32:35Z")

</div>

Hi Steve,

maybe try it like this:

```python
${json}= Set Variable { "record" : { "f1":"valueforf1", "f2":"valueforf2", "f3": "srawlins@zebra.com", "f4": "Rawlins", "f5": "Steve", "generated_url" : "${url}"}}
${host}= Set Variable ${service_address}:8080
${service}= Set Variable svc.MyService.CreateMethod
${result}= Run Process grpcurl -d ${json} -plaintext ${host} ${service} stdout=stdout.txt stderr=stderr.txt 

```

There might be other ways to approach the problem, but this was the simplest I thought of. Another option which might work (i’m not 100% on this), use the collections library and append all the options to a List and pass the list to Run Process’s arguments.

Hope this helps,

Dave.
