# Named pipes

**URL:** https://discourse.julialang.org/t/named-pipes/115627
**Category:** General Usage
**Tags:** question, io
**Created:** [June 13, 2024, 11:55pm UTC](https://discourse.julialang.org/t/named-pipes/115627 "2024-06-13T23:55:52Z")
**Posts on this page:** 1
**Showing post:** 18

<div class="post-metadata">

### Author: ![ericphanson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ericphanson/32/215186_2.png) [@ericphanson](https://discourse.julialang.org/u/ericphanson)
#### Post date: [June 14, 2024, 5:50pm UTC](https://discourse.julialang.org/t/named-pipes/115627/18 "2024-06-14T17:50:34Z")

</div>

here is that example using `mkfifo`, in case it’s helpful:

```julia
julia> str = """
           abc
           def
       """
" abc \n def\n"

julia> run(`mkfifo my_named_pipe`)
Process(`mkfifo my_named_pipe`, ProcessExited(0))

julia> t1 = Threads.@spawn open("my_named_pipe", "w") do io
           println(io, str)
       end
Task (runnable) @0x000000032063aef0

julia> t2 = Threads.@spawn read(`grep "abc" my_named_pipe`, String)
Task (runnable) @0x000000032063b080

julia> wait.([t1, t2])
2-element Vector{Nothing}:
 nothing
 nothing

julia> fetch(t2)
" abc \n"

```

(I know the discussion has moved on to sockets though)

---

_[View the full topic](https://discourse.julialang.org/t/named-pipes/115627)._
