# How to pass multiple arguments to shell script in execbeat?

**URL:** <https://discuss.elastic.co/t/how-to-pass-multiple-arguments-to-shell-script-in-execbeat/75715>\
**Category:** Beats\
**Created:** [February 20, 2017, 10:43am UTC](https://discuss.elastic.co/t/how-to-pass-multiple-arguments-to-shell-script-in-execbeat/75715 "2017-02-20T10:43:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![elasticheart](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elasticheart/32/65189_2.png) [@elasticheart](https://discuss.elastic.co/u/elasticheart)\
**Post date:** [February 20, 2017, 10:43am UTC](https://discuss.elastic.co/t/how-to-pass-multiple-arguments-to-shell-script-in-execbeat/75715/1 "2017-02-20T10:43:29Z")

</div>

Hi,

I use execbeat to execute my shellscript, which accept multiple arguments. I have my execbeat configuration like;

```
execbeat:
  execs:
    -
      cron: "@every 5s"
      command: "/shellscripts/test.sh"
      args: "arga argb argc"
      document_type: execbeat
      fields:
        host: 192.168.0.1
        beatname: "beat1"
output.console:
  enabled: true
  pretty: true

```

my scellscript is very simple, its like;

```
#!/bin/sh
echo $1

```

but my ecexbeat always outputs;

```
arga argb argc

```

I am expecting only one output `arga`, how can I do this?

Thank you.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 20, 2017, 11:38pm UTC](https://discuss.elastic.co/t/how-to-pass-multiple-arguments-to-shell-script-in-execbeat/75715/2 "2017-02-20T23:38:44Z")

</div>

I'll close this in favour of [Passing shell script arguments to exectbeat not working](https://discuss.elastic.co/t/passing-shell-script-arguments-to-exectbeat-not-working/75693)

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 20, 2017, 11:38pm UTC](https://discuss.elastic.co/t/how-to-pass-multiple-arguments-to-shell-script-in-execbeat/75715/3 "2017-02-20T23:38:47Z")

</div>


