# Removing the first line in a text file

**URL:** <https://discourse.julialang.org/t/removing-the-first-line-in-a-text-file/35521>\
**Category:** New to Julia\
**Tags:** question\
**Created:** [March 4, 2020, 2:39pm UTC](https://discourse.julialang.org/t/removing-the-first-line-in-a-text-file/35521 "2020-03-04T14:39:59Z")\
**Posts on this page:** 1\
**Showing post:** 8

<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:** [March 4, 2020, 9:53pm UTC](https://discourse.julialang.org/t/removing-the-first-line-in-a-text-file/35521/8 "2020-03-04T21:53:47Z")

</div>

> [@jling](#):
>
> why not use POSIX tools…

POSIX tools are great, but Julia code that relies on them will not be portable.

Also, spawning executables takes a lot of time, so for simple tasks it is often [orders of magnitude faster](https://discourse.julialang.org/t/how-to-obtain-the-result-of-a-diff-between-2-files-in-a-loop/23784/4) to use Julia code than to spawn a POSIX command-line program.

For example, `run(pipeline(`tail -n +2 $inputname`, stdout=outputname))` seems to be about 10²× slower on my computer than my native-Julia `readuntil` code [above](https://discourse.julialang.org/t/removing-the-first-line-in-a-text-file/35521/6) for most files.

---

_[View the full topic](https://discourse.julialang.org/t/removing-the-first-line-in-a-text-file/35521)._
