How would I go about truncating a binary file when a certain pattern is found?For instance, I want to truncate the file at the first occurrence of the pattern 0xFFFFFFFF.I think something like awk could do the trick... but I'm not exactly sure how.thanks
Truncate a file on a certain pattern
awk
Convert to octal and assign to the record separator.awk 'BEGIN{RS=\377\377\377\377} NR==1 {print;exit}'