#! /bin/sed -f s/[^][+<>.,-]//g s/\([-+]\)/\1\1*p;/g s//p++;/g s/\./putchar(*p);/g s/,/*p=getchar();/g s/\[/while (*p) {/g s/\]/}/g 1s/^/#include \ int main(void){char *p=calloc(1,10000);/ $s/$/}/ /./!d # Here is an example BF program # # +[>>+++++[<++++++>-]<[>++++[>++++++++<-]<[->+>.<<]>[-<+>]+++++ # [>+++++<-]>+++.-.<+++[>------<-]>.---------.<+++++[>++++++<-]> # .--.[-]++++++++++.[-]<<-]>+++++[<++++++>-]>>[-]<<<[>++++[>++++ # ++++<-]>>[<.>>+<-]>[-<+>]<+<<+++++[->++++++<]>.--.<++++[>----- # --<-]>.++++++++.<+++[>++++++<-]>.++++.[-]++++++++++.[-]<<-]<]