# Run(\`\`),and how to add $

**URL:** <https://discourse.julialang.org/t/run-and-how-to-add/91947>\
**Category:** New to Julia\
**Tags:** question\
**Created:** [December 21, 2022, 12:03pm UTC](https://discourse.julialang.org/t/run-and-how-to-add/91947 "2022-12-21T12:03:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zhangchunyong](https://avatars.discourse-cdn.com/v4/letter/z/d9b06d/32.png) [@zhangchunyong](https://discourse.julialang.org/u/zhangchunyong)\
**Post date:** [December 21, 2022, 12:03pm UTC](https://discourse.julialang.org/t/run-and-how-to-add/91947/1 "2022-12-21T12:03:16Z")

</div>

I ran this code in linux shell.  
And I want to filter the last column which is smaller than 1000.

```julia
cat test.bed
999981 999981 HES4 981
1173903 1173903 TTLL10 15903
1173903 1173903 TTLL10 1903
1287109 1287109 SCNN1D 6892
1331314 1331314 TAS1R3 314
1449914 1449914 ATAD3C 4087
1471769 1471769 ATAD3B 2769
1540350 1540350 TMEM240 350
1659012 1659012 CDK11B 12

```

When I ran in julia first,I made it.

```julia
julia> run(pipeline(`cat test.bed`,`awk '$NF<1000'`))
999981 999981 HES4 981
1331314 1331314 TAS1R3 314
1540350 1540350 TMEM240 350
1659012 1659012 CDK11B 12
Base.ProcessChain(Base.Process[Process(`cat test.bed`, ProcessExited(0)), Process(`awk '$NF<1000'`, ProcessExited(0))], Base.DevNull(), Base.DevNull(), Base.DevNull())

```

But I want change 1000 into $number,and failed.

```julia
number=1000
julia>run(pipeline(`cat test.bed`,`awk '$NF<$number'`))
999981 999981 HES4 981
1659012 1659012 CDK11B 12
Base.ProcessChain(Base.Process[Process(`cat test.bed`, ProcessExited(0)), Process(`awk '$NF<$number'`, ProcessExited(0))], Base.DevNull(), Base.DevNull(), Base.DevNull())

```

They were different.How to do to add $number in my second code to acheive that fact in my first code?Thanks.

---

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [December 21, 2022, 12:50pm UTC](https://discourse.julialang.org/t/run-and-how-to-add/91947/2 "2022-12-21T12:50:30Z")

</div>

> [@zhangchunyong](#):
>
> They were different.How to do to add $number in my second code to acheive that fact in my first code?

```julia
julia> run(pipeline(`cat test.bed`,`awk "\$NF<$number"`))
999981 999981 HES4 981
1331314 1331314 TAS1R3 314
1540350 1540350 TMEM240 350
1659012 1659012 CDK11B 12

```

However, note that Julia is a perfectly good language for string processing, with built-in regular expressions and many libraries for parsing tabulated data, so it’s fairly wasteful and unnecessary to pipe out to `awk` for things like this. It can be tempting to stick with familiar tools, but in the long run you’ll be much better off learning to use Julia when programming in Julia.
