How to bind all rows except the first row

For example, I have a file

1 2 3 

then I want to print from the second line to the tail

How to do it in linux

+5
source share
2 answers
 tail -n+2 my_file 

will output all lines in myfile starting from line 2. ( -n2 will show you the last two lines.)

tail has more features. Enter man tail for full documentation.

+14
source

shorter with

 $ sed 1d filename 

or with awk

 $ awk 'NR>1' filename 
+2
source

Source: https://habr.com/ru/post/1239388/


All Articles