Skip to main content
13 events
when toggle format what by license comment
Jun 27, 2015 at 21:03 history edited mikeserv CC BY-SA 3.0
do substitution *after* pulling newline so test can branch for all fail cases and still put \\x before latest failed pull
Jun 27, 2015 at 20:13 comment added mikeserv @Masi - no, i don't write short regexps to avoid binary output - and if you mean because GNU sed will interpret \xch then, honestly, i regard escape processing of that kind only a nuisance anyway -its never useful (seriously - i'm writing a regexp for data manipulation. if i want to, i can get you the literal byte, sed - stop trying to be so helpful anyway - you're screwing stuff up). i write short regexps because that's all i need to write. Usually, using very specific patterns is self-defeating. If you can't imagine anything but what you want matching what you've got, it's enough.
Jun 27, 2015 at 19:50 comment added mikeserv @Masi - if i understood any of what you said before correctly, i think you had a good point, too - why do i remove the ff/fa strings if i don't have to? So i put them back.
Jun 27, 2015 at 19:48 history edited mikeserv CC BY-SA 3.0
added 399 characters in body
Jun 27, 2015 at 19:46 comment added Léo Léopold Hertz 준영 I think you have best idea about how to do this; I am just a newbie. Note the data of last header is not complete. Otherwise, fixed length of data between headers marked just by four fa's. I just learned that you are doing things right: s/ .* f//;s/a E.*//' is necessary in first sed, otherwise binary output.
Jun 27, 2015 at 19:24 comment added mikeserv @Masi - i dunno - i dunno the format. If i got anything right at all it was just a lucky guess. When should it be set then? And honestly, i think that if you can make the idea of looking for byte offset of header...last header...splitting fixed position stuff a little clearer, it might make it easier for me to help. I'm don't really follow that very well.
Jun 27, 2015 at 19:21 history edited mikeserv CC BY-SA 3.0
added 107 characters in body
Jun 27, 2015 at 19:21 comment added Léo Léopold Hertz 준영 Much better! Why is the prefix of the byte code ff omitted? The byte offset is fixed. So I have had an idea of looking for the length of the byte offset of the header, location of last header in tail and splitting by fixed position. I am afraid that if we do not prefix ff the fixed splitting will not work. Why is the mark E_N_D is set after the first ffffffff?
Jun 27, 2015 at 18:46 history edited mikeserv CC BY-SA 3.0
added 4 characters in body
Jun 27, 2015 at 18:32 comment added mikeserv @Masi - well i did just edit it - try it again? I guess it was missing a quote. it shouldn't now - i just copied it from the terminal.
Jun 27, 2015 at 18:31 history edited mikeserv CC BY-SA 3.0
added 11 characters in body
Jun 27, 2015 at 17:57 history edited mikeserv CC BY-SA 3.0
added 1 character in body
Jun 27, 2015 at 17:08 history answered mikeserv CC BY-SA 3.0