Source From Here
Question
I have a file, foo.txt, containing the following lines:
I want a simple command that results in the contents of foo.txt being:
How-To
This is by far the fastest and simplest solution, especially on big files:
Do not use sed for deleting lines from the top or bottom of a file -- it's very very slow if the file is large. It can still work as below:
I have a file, foo.txt, containing the following lines:
- a
- b
- c
- a
- b
This is by far the fastest and simplest solution, especially on big files:
Do not use sed for deleting lines from the top or bottom of a file -- it's very very slow if the file is large. It can still work as below:
沒有留言:
張貼留言