# Linux: Start bash-script and don't wait for execution

**URL:** <https://discourse.julialang.org/t/linux-start-bash-script-and-dont-wait-for-execution/95162>\
**Category:** General Usage\
**Tags:** repl, bash\
**Created:** [February 24, 2023, 7:48pm UTC](https://discourse.julialang.org/t/linux-start-bash-script-and-dont-wait-for-execution/95162 "2023-02-24T19:48:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ellocco](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ellocco/32/31331_2.png) [@ellocco](https://discourse.julialang.org/u/ellocco)\
**Post date:** [February 24, 2023, 7:48pm UTC](https://discourse.julialang.org/t/linux-start-bash-script-and-dont-wait-for-execution/95162/1 "2023-02-24T19:48:54Z")

</div>

Is it possible in a standalone `REPL` (outside of `VScode`) to start a bash-script and get back focus on the current external `REPL` right after?  
Here my snippet that works fine in `VScode`, but fails outside the integrated `VScode-REPL`:

```julia
s_bat = "test.sh"
cd("/media/stefan/DATA/data/temp")
pwd()
fid = open(s_bat, "w")
    println(fid, "#! /bin/bash")
    println(fid, "echo Hallo Julia!")
close(fid)
Base.Filesystem.chmod(s_bat, 0o500) 
cmd_ = Cmd(`konsole --separate --noclose --show-menubar -e ./$s_bat \&`; windows_verbatim=true, detach=true)
run(cmd_)

```

---

<div class="post-metadata">

**Author:** ![PeterSimon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petersimon/32/25193_2.png) [@PeterSimon](https://discourse.julialang.org/u/PeterSimon)\
**Post date:** [February 24, 2023, 9:09pm UTC](https://discourse.julialang.org/t/linux-start-bash-script-and-dont-wait-for-execution/95162/2 "2023-02-24T21:09:06Z")

</div>

Did you try

```julia
run(cmd_, wait=false)

```

as documented [here](https://docs.julialang.org/en/v1/base/base/#System)?

---

<div class="post-metadata">

**Author:** ![ellocco](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ellocco/32/31331_2.png) [@ellocco](https://discourse.julialang.org/u/ellocco)\
**Post date:** [February 24, 2023, 9:12pm UTC](https://discourse.julialang.org/t/linux-start-bash-script-and-dont-wait-for-execution/95162/3 "2023-02-24T21:12:29Z")

</div>

Sorry, - no … Thanks a lot 🙂

---

<div class="post-metadata">

**Author:** ![PeterSimon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petersimon/32/25193_2.png) [@PeterSimon](https://discourse.julialang.org/u/PeterSimon)\
**Post date:** [February 24, 2023, 9:21pm UTC](https://discourse.julialang.org/t/linux-start-bash-script-and-dont-wait-for-execution/95162/4 "2023-02-24T21:21:56Z")

</div>

> [@ellocco](#):
>
> Sorry, - no

No need to apologize–glad I could help 🙂
