Download code

Jump to: navigation, search

Back to Sierpinski_triangle_(Sed)

Download for Windows: single file, zip

Download for UNIX: single file, zip, tar.gz, tar.bz2

sierpinski.sed

1 x;s/^$/@/;p
2 s/.*/c  &  /
3 :loop
4 s/c \(  \)/ c\1/
5 s/c@\(@@\)/ c\1/;tloop
6 s/c.\(..\)/@c\1/@ text
7 ;tloop
8 s/c.*//
9 x;d