# 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:** 9

<div class="post-metadata">

### Author: ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)
#### Post date: [June 14, 2024, 11:35am UTC](https://discourse.julialang.org/t/named-pipes/115627/9 "2024-06-14T11:35:01Z")

</div>

Can someone give me a simple example on how to use `Sockets` for that? From the documentation I cannot figure it out.

For example, let us suppose I want to use `grep` to extract some lines from a string (I’m not _actually_ willing to do that, this is just a simple example to illustrate what I want):

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

julia> open("str.txt", "w") do io
           println(io, str)
       end

julia> gr = read(pipeline(`grep "abc" str.txt`), String)
" abc \n"

```

Here, I’m writing to disc an intermediate file `str.txt`. How can avoid that using `Sockets`?

---

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