Pages

Wednesday, February 18, 2015

How can I remove the first line of a text file using bash/sed script?

How can I remove the first line of a text file using bash/sed script?

The  command ,  "sed" can help removing the first line of a text.

"sed" can be used with any command, Say find , cat etc.

find . | sed '1d' 

cat File | set '1d'

This will remove the file line of the entry.

As usual, I got the solution in stackoverflow and the link is here.

http://stackoverflow.com/questions/339483/how-can-i-remove-the-first-line-of-a-text-file-using-bash-sed-script

No comments:

Post a Comment