diff --git a/2013/dlowe/README.md b/2013/dlowe/README.md index 0ff3e07ab..e644957e2 100644 --- a/2013/dlowe/README.md +++ b/2013/dlowe/README.md @@ -28,6 +28,34 @@ make echo "sparkline of file sizes: $(wc -c * | awk '{print $1}' | xargs ./dlowe)" # or ./slen.sh ./dlowe 0 + +echo "sparkline of file sizes: $(wc -c * | awk '{print $1}' | xargs ./dlowe)" # or ./slen.sh +``` + +Alternatively, for the lazy or those short on time, try: + +```sh +./demo.sh +``` + +What is different about the above if you do something like: + +```sh +echo 'IOCCC 2013' > ioccc.txt +./demo.sh +rm -f ioccc.txt +``` + + +To make it simpler to see try showing just the last two lines: + +```sh +./demo.sh | tail -n 2 > 1.txt +echo 'IOCCC 2013' > ioccc.txt +./demo.sh | tail -n 2 > 2.txt +rm -f ioccc.txt +diff 1.txt 2.txt +rm 1.txt 2.txt ``` ## INABIAF - it's not a bug it's a feature! :-) diff --git a/2013/dlowe/demo.sh b/2013/dlowe/demo.sh new file mode 100755 index 000000000..daebfe6e6 --- /dev/null +++ b/2013/dlowe/demo.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +make clobber all || exit 1 + +echo "$ ./dlowe 0 1 2 3 4 5 6 7" +./dlowe 0 1 2 3 4 5 6 7 +echo +echo "$ ./dlowe 16 32 64 128" +./dlowe 16 32 64 128 +echo +echo "$ ./dlowe 16 32 64 128 256" +./dlowe 16 32 64 128 256 +echo +echo "$ ./dlowe 16 32 64 128 256 512" +./dlowe 16 32 64 128 256 512 +echo +echo "$ ./dlowe 0" +./dlowe 0 +echo +echo "$ ./slen.sh" +./slen.sh diff --git a/thanks-for-fixes.md b/thanks-for-fixes.md index a55f85941..df90cbad3 100644 --- a/thanks-for-fixes.md +++ b/thanks-for-fixes.md @@ -1626,6 +1626,9 @@ running `make all` will create a symlink to `dlowe` as `sparkl`. Running `make clobber` will delete both and running `make clobber all` will ensure that the symlink is created. +Cody also added the [demo.sh](2013/dlowe/demo.sh) script to more easily try the +program. + ## [2013/hou](2013/hou/hou.c) ([README.md](2013/hou/README.md))