# System.util.execute and echo to file

**URL:** <https://forum.inductiveautomation.com/t/system-util-execute-and-echo-to-file/67452>\
**Category:** Ignition\
**Created:** [December 9, 2022, 8:13pm UTC](https://forum.inductiveautomation.com/t/system-util-execute-and-echo-to-file/67452 "2022-12-09T20:13:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tordvd](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tordvd/32/11525_2.png) [@tordvd](https://forum.inductiveautomation.com/u/tordvd)\
**Post date:** [December 9, 2022, 8:13pm UTC](https://forum.inductiveautomation.com/t/system-util-execute-and-echo-to-file/67452/1 "2022-12-09T20:13:38Z")

</div>

Hello everyone,  
I am trying to use the `system.util.execute()` function to create some log files on the ubuntu host OS.  
Anyone know how to make the magic work with this simple shell command:

```auto
echo "Some text for my log file" > testfile.log

```

In Ignition the following is **not working** :

```auto
system.util.execute(["echo","Some text for my log file",'>',path+"/testfile.log"])

```

even though I have tried multiple variants of that one. I suspect im having problems with the `>` operator. I also need this one for my next execute command which is **also not working** :

```auto
system.util.execute(["git","-C",path,"status",">",path+"/myGit.log"])

```

Thanks for reading this!

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [December 9, 2022, 8:25pm UTC](https://forum.inductiveautomation.com/t/system-util-execute-and-echo-to-file/67452/2 "2022-12-09T20:25:51Z")

</div>

You're mixing up shell commands with what are supposed to be program arguments.

Easiest thing to do would be to stick these into a shell script and execute that script.

Otherwise you'll want to play with some variation that looks like (untested):

```auto
system.util.execute(["/bin/sh", "-c", "git -C ... full command here"])

```

You also need to keep in mind the scope in which you're executing this. If you're using the Designer Script Console, for example, it's executing wherever the Designer is running.
