
On Wed, Aug 01, 2012 at 04:01:41PM -0700, Mike Frysinger wrote:
On Wednesday 01 August 2012 18:46:18 Allen Martin wrote:
But maybe I'll rewrite it in prolog just to mess with you guys
i'd ack it if it were written in bf -mike
Challenge accepted
#!/bin/sh # # binutils-version [-p] gas-command # # Prints the binutils version of `gas-command' in a canonical 4-digit #form # such as `0222' for binutils 2.22 #
gas="$*"
if [ ${#gas} -eq 0 ]; then echo "Error: No assembler specified." printf "Usage:\n\t$0 <gas-command>\n" exit 1 fi
tmp=$(mktemp) echo '>>++++[<++++++++>-]>>+++++[>+++++++++<-]>+>,[>>++++[<++++++++>-]>>+++++[>\ +++++++++<-]>+>,]<<<<<<[<<<<<<]>>>>>>[<[<+>-]>[<<-<+>>>-]<<<[>>>+<<<-]>[>+<[-]]\
>>]<<<<<<[<<<<<<]>>>>>[>>>>>>]><<<<<<<<<<<<[-]<[-]++++++[>++++++++<-]>.>>\
.>>>>>>>>>>>>.>>>>>>.' > $tmp
$gas --version | bf -n $tmp rm $tmp
-Allen