just in case anyone finds this useful:
* $ cat bitfizz.pl *
#! / usr / bin / perl
use strict;
if (($ # ARGV + 1)! = 2) {print "usage $ 0 \ n"; }
my @r = & bitfizz ($ ARGV [0], $ ARGV [1]);
for (@r) {print "$ _ \ n"; }
sub bitfizz () {
$ _ [0] = join (",", split (//, $ _ [0]));
for (my $ i = 1; $ i & lt = $ _ [1]; $ i + = 1) {$ _ = $ _. "{$ _ [0]}"; }
@ r = glob ($ _);
}
then you can do:
* perl bitfizz.pl "01" 8 *
00000000
00000001
00000010
00000011
00000100
--snip--
all byte permutations in bits or
* perl bitfizz.pl "0123456789ABCDEF" 2 *
eg
wibble
source share