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.evil
cmp -bl file.{evil,orig} | sed 's/ 55.*//'
And a simple function for doing things multiple times:
times ()
{
__times_repeats=$1;
shift;
for __times_loopv in $(seq 1 $__times_repeats);
do
$@;
done;
unset __times_loopv;
unset __times_repeats
}
(I expect that there are probably obvious bugs in that!)