If you want to select a range of lines from a file, look no farther than your handy ’sed’ utility. It is by definition, the perfect tool for the job!
Everything you ever wanted to know about the stream editor sed. Pattern matching, delimiters, deletion, ranges, grouping, all explained.
Change lowercase to uppercase or vice versa using sed the brute force easy way and the smart way. One use of this would be finding the hardware address of an interface and converting it to all uppercase.
The problem is, hexdump will give you 16 ascii characters surrounded by pipes and then a newline before printing the next 16. You can’t search for long strings that way…
Using sed’s delete, you can specify the start and beginning using the carot and dollar sign with nothing in between. You could replace this with something else using a search ’s/^$/stuff/g or just delete it like this:
Here’s a bunch of ways to get the ip addresses for all your network interfaces using ifconfig.