Let's say I have a text file called results.txt and the only information that I need is in lines 100 to 200. I want to display this text in Ubuntu Terminal. What is the best solution?
Thank You in advance!
Use cat
and grep
command:
cat -n filename | grep -A100 '\b100\b'
It means search for 100th line and show the following 100 lines
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.