How to ignore last line of a CSV #259
Answered
by
jqnatividad
jqnatividad
asked this question in
Q&A
-
|
Beta Was this translation helpful? Give feedback.
Answered by
jqnatividad
Apr 14, 2022
Replies: 1 comment
-
This can be handled several ways:
more info here - https://unix.stackexchange.com/questions/52779/delete-last-line-from-the-file |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
jqnatividad
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This can be handled several ways:
using qsv:
input
, using the--skip_lastlines
option (ping @pkptzx)QSV_COMMENT_CHAR
env var to a character like#
, and then have the last line start with that char.with
sed
:sed -i '$d' <file>
with
head
:head --lines=-1
more info here - https://unix.stackexchange.com/questions/52779/delete-last-line-from-the-file