Question

I am using hexdump to display file in a readable format. The file is quite large and i know only the line numbers. length of lines are uncertain (may be 10 characters or 100 characters).

Is there any option to hexdum few line suppose 5 to 10 or 17-25. I have read the man page and a better explanation from here. But I couldn't get my answer.

So please help me.

Thanks..

Was it helpful?

Solution

Is it possible to cut the right lines from a file and pipe them into hexdump? For example,

cat myfile | sed -n '17,25 {p;n;n;}' | od -x

might be close to what you need if you want to dump lines 17 to 25 of myfile

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top