`run.sh` prints several iterations of rule 110 by running `rule110.sed` in a loop. Additionally it formats the output to use ' ' for 0 and '#' for space.
13 lines
196 B
Bash
Executable File
13 lines
196 B
Bash
Executable File
#!/bin/sh
|
|
|
|
repeat=$(printf '%s' "$1" | wc -c)
|
|
|
|
next=$1
|
|
echo $next | tr '1' '#' | tr '0' ' '
|
|
|
|
for _ in `seq $repeat`; do
|
|
next=$(./rule110.sed <<<$next)
|
|
echo $next | tr '1' '#' | tr '0' ' '
|
|
done
|
|
|