Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

buffer limit on pipe command

Status
Not open for further replies.

ninguno

Technical User
Jan 29, 2003
3
0
0
US
i'm trying to chop the headerfile off of a bunch of images.
the image data is 524288 bytes, with the headers varying in size (usually around 5k).

the simple way to do it would be:
tail -c-524288 filename | cat >newfile

but, it ends up with a file that's about half as large as I want it to be, I'm assuming due to a buffer limit on the pipe.

Is there a better way to go about this, or how do I change the buffer limit on pipe (and is that safe to do?)
 
The man page of tail states: "The tail command will only tail the last 256 Kbytes of a file regardless of its line count". May this be the problem? I would try to split the file by searching the end of the header/start of the image but do not know how to do it exactly. awk?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top