# Use of nohup inside the run() command

**URL:** <https://discourse.julialang.org/t/use-of-nohup-inside-the-run-command/85945>\
**Category:** General Usage\
**Tags:** question\
**Created:** [August 18, 2022, 7:23pm UTC](https://discourse.julialang.org/t/use-of-nohup-inside-the-run-command/85945 "2022-08-18T19:23:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![marllos](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/marllos/32/205917_2.png) [@marllos](https://discourse.julialang.org/u/marllos)\
**Post date:** [August 18, 2022, 7:23pm UTC](https://discourse.julialang.org/t/use-of-nohup-inside-the-run-command/85945/1 "2022-08-18T19:23:45Z")

</div>

Hello everyone! Congratulations on the release of version 1.8 of Julia, it just keeps getting better and better! I would like to ask the following question: What is the correct form of the command?  
`run(`nohup julia test.jl $s \> report.out \&`)`  
It is not directing to report.out, but to nohup.out. (I have already searched the similar topics). I need to make several calls like this, each directing to a specific output. Thanks.

```julia
# test.jl file
function test()
	sleep(20)
	x = length(ARGS) ≥ 1 ? parse(Float64, ARGS[1]) : 0.0
	println(x^0.5)
end

test()
# end test.jl file

# run.jl file
function main()
	s = length(ARGS) ≥ 1 ? parse(Float64, ARGS[1]) : 0.0
	run(`nohup julia test.jl $s \> report.out \&`)
	# is not directing to report.out 
end

main()
# end file

terminal> julia run.jl 2.0

```

---

<div class="post-metadata">

**Author:** ![digital\_carver](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/digital_carver/32/33818_2.png) [@digital\_carver](https://discourse.julialang.org/u/digital_carver)\
**Post date:** [August 18, 2022, 8:22pm UTC](https://discourse.julialang.org/t/use-of-nohup-inside-the-run-command/85945/2 "2022-08-18T20:22:54Z")

</div>

You can do

```julia
  run(`bash -c "nohup julia test.jl $s > report.out &"`)

```

instead.

---

<div class="post-metadata">

**Author:** ![marllos](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/marllos/32/205917_2.png) [@marllos](https://discourse.julialang.org/u/marllos)\
**Post date:** [August 18, 2022, 10:52pm UTC](https://discourse.julialang.org/t/use-of-nohup-inside-the-run-command/85945/3 "2022-08-18T22:52:24Z")

</div>

Very good, thank you.
