Efficient way to read a specific line number of a file. (BONUS: Python Manual Misprint)

前端 未结 5 678
醉梦人生
醉梦人生 2021-02-09 17:02

I have a 100 GB text file, which is a BCP dump from a database. When I try to import it with BULK INSERT, I get a cryptic error on line number 219506324. Before sol

5条回答
  •  梦如初夏
    2021-02-09 17:50

    You can try this sed one-liner: sed '42q;d' to fetch line number 42. It's not in Python or C#, but I assume you have sed on your Mac.

提交回复
热议问题