eg, you may wish cut a block of text from a log file or even web page using the links -dump command instead of cat.
The script works by matching the text in the first sed statement and then the last text and outputs it to screen.
The last sed removes the last line of text from the output.
cat filename.txt | sed -n "/^first line to to cut/,/last lne to cut/p"| sed '$d'
No comments:
Post a Comment