sed -i -e '2d' file | delete 2nd line in the file | sed script to delete last line of a file: $d

[lisa@localhost sales]$ cat file
    October 2017 
Su Mo Tu We Th Fr Sa
 1  2  3  4  5  6  7
 8  9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
=====
[lisa@localhost sales]$ sed -i -e '2d' file
[lisa@localhost sales]$ cat file
    October 2017 
 1  2  3  4  5  6  7
 8  9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
======
sed script to delete last line of a file: $d

Comments

Popular posts from this blog

HAproxy logging

teamcity Automatic Agent Start under Linux

NFS mount add in fstab _netdev instead of default | firewall-cmd --list-all