This shows you the differences between two versions of the page.
— |
using_tail_to_output_all_but_the_first_line [2020/06/01 22:53] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Using TAIL to Output All But the First Line of a Text File ====== | ||
+ | You can use the //tail// command to output all but the first line, or first few lines, of a particular text file. Here's an example. | ||
+ | |||
+ | tail +2 input.txt | ||
+ | | ||
+ | This works very similar to the //cat// command. Instead of outputting the entire file, however, it skips to the second (+2) line. This is great for outputting a CSV file while skipping the header line in that file. |