# Running shell command got NSException

**URL:** <https://forums.eggplantsoftware.com/t/running-shell-command-got-nsexception/7810>\
**Category:** Uncategorized\
**Created:** [May 3, 2022, 10:06pm UTC](https://forums.eggplantsoftware.com/t/running-shell-command-got-nsexception/7810 "2022-05-03T22:06:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![alamo](https://forums.eggplantsoftware.com/letter_avatar_proxy/v4/letter/a/b782af/32.png) [@alamo](https://forums.eggplantsoftware.com/u/alamo)\
**Post date:** [May 3, 2022, 10:06pm UTC](https://forums.eggplantsoftware.com/t/running-shell-command-got-nsexception/7810/1 "2022-05-03T22:06:33Z")

</div>

put shell(“ls”) # for example  
I got the error.

put Shell (“ls”)  
\<\<NSException: 0x1e171c18\> NAME:NSFileHandleOperationException REASON:read already in progress INFO:(null)\>  
result: -9999

Anybody knows why?

Thanks,

---

<div class="post-metadata">

**Author:** ![DaveHester](https://forums.eggplantsoftware.com/user_avatar/forums.eggplantsoftware.com/davehester/32/104_2.png) [@DaveHester](https://forums.eggplantsoftware.com/u/DaveHester)\
**Post date:** [May 4, 2022, 1:14pm UTC](https://forums.eggplantsoftware.com/t/running-shell-command-got-nsexception/7810/2 "2022-05-04T13:14:34Z")

</div>

Have you tried a format like this:

```auto
put shell("cd /; ls -l") into rootDirectoryList
log rootDirectoryList

```

Hope this helps,  
Dave

---

<div class="post-metadata">

**Author:** ![alamo](https://forums.eggplantsoftware.com/letter_avatar_proxy/v4/letter/a/b782af/32.png) [@alamo](https://forums.eggplantsoftware.com/u/alamo)\
**Post date:** [May 5, 2022, 5:36am UTC](https://forums.eggplantsoftware.com/t/running-shell-command-got-nsexception/7810/3 "2022-05-05T05:36:18Z")

</div>

Thanks Dave,  
I tried, still failed the same reason …

put shell("cd /; ls -l ") into MyDir  
result: -9999  
log MyDir  
5/5/22, 12:34:24 AM Log \<\<NSException: 0xe7455b8\> NAME:NSFileHandleOperationException REASON:read already in progress INFO:(null)\>

---

<div class="post-metadata">

**Author:** ![DaveHester](https://forums.eggplantsoftware.com/user_avatar/forums.eggplantsoftware.com/davehester/32/104_2.png) [@DaveHester](https://forums.eggplantsoftware.com/u/DaveHester)\
**Post date:** [May 6, 2022, 1:03pm UTC](https://forums.eggplantsoftware.com/t/running-shell-command-got-nsexception/7810/4 "2022-05-06T13:03:01Z")

</div>

Your best option at this point is to submit a support request. I have not seen that error before, but our support team may have. [Create A Support Ticket](https://www.eggplantsoftware.com/create-a-support-ticket)

Sorry that I was unable to resolve the issue,  
Dave

---

<div class="post-metadata">

**Author:** ![alamo](https://forums.eggplantsoftware.com/letter_avatar_proxy/v4/letter/a/b782af/32.png) [@alamo](https://forums.eggplantsoftware.com/u/alamo)\
**Post date:** [January 5, 2024, 2:23am UTC](https://forums.eggplantsoftware.com/t/running-shell-command-got-nsexception/7810/5 "2024-01-05T02:23:58Z")

</div>

Thanks Dave,  
After a while, I found out we need to give the absolutely path of the script.  
Before I just used the script name only.
