Senji (senji) wrote,

  • Mood:

Stuff what I have done today.

I'm feeling quite chuffed about thinking at right angles to problems today; having achieved a few tasks in deceptively simple ways.

For example; to find every occurance of a bitstring in a binary file (I was looking for ÿÿÿÿ):
sed 's/ÿÿÿÿ/-ÿÿÿ/g' <file.orig >file.evil
cmp -bl file.{evil,orig} | sed 's/ 55.*//'

And a simple function for doing things multiple times:
times ()
for __times_loopv in $(seq 1 $__times_repeats);
unset __times_loopv;
unset __times_repeats

(I expect that there are probably obvious bugs in that!)
Tags: geeky, shell hacks, work

  • By their accessories shall thee know them.

    I assume that, somewhere — perhaps nestled in the Square Mile, the serious British City Gent still wears his bowler hat and black umbrella and…

  • A royal prial of tandems

    Earlier today, whilst walking between the Leatherhead office and the station, I saw an unusual enough sight at first glance — two pair of…

  • Win!

    Since one of the early heavy rains, which entered the house via the window near my desk and assaulted my Kensington ExpertMousePro the top-left and…

  • Post a new comment


    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.