# 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:** 1

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [15 September 2019 08:03 UTC](https://discourse.nodered.org/t/help-with-shell-command-to-get-a-result-in-a-node/15548/1 "2019-09-15T08:03:05Z")

</div>

I am wanting to fix a `message` I am getting.

This is the message:  
`{"_msgid":"3c5b556c.b18d0a","topic":"","payload":" Used\n 688\n","rc":{"code":0}}`

What I want to get is the amount of usage on a USB stick and map it to a `gauge`.

I found the command:  
`df --output=used /dev/sda1`  
(If that can be made better, all the better.)

So I am getting the message above and want to _turn it into_ a simple (integer) 688.

I've tried things but am not understanding how to do it.

Thanks in advance.

---

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