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.

comments powered by Disqus
using_tail_to_output_all_but_the_first_line.txt · Last modified: 2020/06/01 22:53 (external edit)