# Help with shell command to get a result in a node

**URL:** https://discourse.nodered.org/t/help-with-shell-command-to-get-a-result-in-a-node/15548
**Category:** General
**Created:** [15 September 2019 08:03 UTC](https://discourse.nodered.org/t/help-with-shell-command-to-get-a-result-in-a-node/15548 "2019-09-15T08:03:05Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [15 September 2019 08:17 UTC](https://discourse.nodered.org/t/help-with-shell-command-to-get-a-result-in-a-node/15548/2 "2019-09-15T08:17:56Z")

</div>

You could probably do it with JSONata (but I have no clue how).

I would first look up the `df` command help see if any command line parameter might simplify the output. If not, then I'd use a regular expression. Something like `(\d+)`.

[Here is a working example](https://regex101.com/r/bX1snR/1)

Ps, that site also generates the is code for you to use in a function block (left have menu, generate code)

---

_[View the full topic](https://discourse.nodered.org/t/help-with-shell-command-to-get-a-result-in-a-node/15548)._
