# Run() returns not recognized as an internal or external command

**URL:** <https://discourse.julialang.org/t/run-returns-not-recognized-as-an-internal-or-external-command/39343>\
**Category:** General Usage\
**Tags:** question\
**Created:** [May 12, 2020, 11:44am UTC](https://discourse.julialang.org/t/run-returns-not-recognized-as-an-internal-or-external-command/39343 "2020-05-12T11:44:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![1634](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/1634/32/12119_2.png) [@1634](https://discourse.julialang.org/u/1634)\
**Post date:** [May 12, 2020, 11:44am UTC](https://discourse.julialang.org/t/run-returns-not-recognized-as-an-internal-or-external-command/39343/1 "2020-05-12T11:44:31Z")

</div>

Hi community,

I tried to run linux commands in Julia through

> run(pipeline(`cmd /c Rscript x.R`, `cmd /c gzip`, `cmd /c julia xx.jl`) |\> file)

but then I get

> ‘Rscript’ is not recognized as an internal or external command,  
> operable program or batch file.  
> ‘gzip’ is not recognized as an internal or external command,  
> operable program or batch file.  
> ‘julia’ is not recognized as an internal or external command,  
> operable program or batch file.

`cmd /c` seems to be simply windows command, is there a way to run this in linux(Ubuntu 20.04 LTS)?

---

<div class="post-metadata">

**Author:** ![pixel27](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pixel27/32/8902_2.png) [@pixel27](https://discourse.julialang.org/u/pixel27)\
**Post date:** [May 12, 2020, 2:18pm UTC](https://discourse.julialang.org/t/run-returns-not-recognized-as-an-internal-or-external-command/39343/2 "2020-05-12T14:18:40Z")

</div>

I’m not clear on what exactly you are trying to do. Are you on Windows and trying to run Linux commands in Julia? That won’t work, since Julia is just telling Windows to execute the commands.

If you are on Linux and trying to run Linux commands from Julia then you don’t want the `cmd` because that is a Windows command.

So on Linux the code would probably be:

```julia
run(pipeline(`Rscript x.R`, `gzip`, `julia xx.jl`) |> file)

```

This assumes `Rscript`, `gzip`, and `julia` can all be found on the path. If they are not then you would need to provide the full path to those programs.

---

<div class="post-metadata">

**Author:** ![1634](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/1634/32/12119_2.png) [@1634](https://discourse.julialang.org/u/1634)\
**Post date:** [May 13, 2020, 10:54am UTC](https://discourse.julialang.org/t/run-returns-not-recognized-as-an-internal-or-external-command/39343/3 "2020-05-13T10:54:10Z")

</div>

My system is window10 and I just realize that I can directly run script in linux instead of through Julia.
