# Cmd vs String

**URL:** <https://discourse.julialang.org/t/cmd-vs-string/9318>\
**Category:** General Usage\
**Created:** [February 25, 2018, 5:43pm UTC](https://discourse.julialang.org/t/cmd-vs-string/9318 "2018-02-25T17:43:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![iwelch](https://avatars.discourse-cdn.com/v4/letter/i/8c91f0/32.png) [@iwelch](https://discourse.julialang.org/u/iwelch)\
**Post date:** [February 25, 2018, 5:43pm UTC](https://discourse.julialang.org/t/cmd-vs-string/9318/1 "2018-02-25T17:43:41Z")

</div>

dear julia experts—I am trying to understand why julia avoids strings as arguments for `run` and `readall`. WIth Cmd and run and readall, it can require some effort construct pipelines, too. Then there is the fact that it is yet another important type to take care of.

Is the key design aspect for Cmd the intent to avoid shell escapes for better security?

partly to understand this better, partly to make my life easier when I really know what I want to do, if I have a `mystring="ls -s | sort -n"`, can I trick julia into passing this to a shell for execution (not quoted), anyway?

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [February 25, 2018, 6:56pm UTC](https://discourse.julialang.org/t/cmd-vs-string/9318/2 "2018-02-25T18:56:25Z")

</div>

> [@iwelch](#):
>
> why julia avoids strings as arguments for run and readall.

> **[Put This In Your Pipe](https://julialang.org/blog/2013/04/put-this-in-your-pipe/)**
>
> Put This In Your Pipe | In a \[previous post\](/blog/2012/03/shelling-out-sucks/), I talked about why

---

<div class="post-metadata">

**Author:** ![ScottPJones](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/scottpjones/32/146_2.png) [@ScottPJones](https://discourse.julialang.org/u/ScottPJones)\
**Post date:** [February 25, 2018, 7:29pm UTC](https://discourse.julialang.org/t/cmd-vs-string/9318/3 "2018-02-25T19:29:23Z")

</div>

The one thing I feel is rather wasteful (of a scarce resource as ASCII characters), is using back-ticks for this, instead of simply using a string macro, such as `cmd"..."` or `c"..."`)
