"cat life" >> life
Posted: March 7, 2008 | Author: Doug | Filed under: Buddhism, Linux, Religion, Technology, Zen | 3 Comments »In the difficult Buddhist text, the Lankavatara Sutra, a favorite of Zen Buddhists, the Buddha teaches Mahamati about reality, when he says:
All that can be said, is this, that relatively speaking, there is a constant stream of becoming, a momentary and uninterrupted change from one state of appearance to another.
and later:
When this entire universe is regarded as concatenation and as nothing else but concatenation, then the mind, by its patient acceptance of the truth that all things are un-born*, gains tranquility.
The Lankavatara Sutra makes my head hurt every time I read it, so being an IT guy, I decided to express the above teachings in Linux/UNIX terms with a simple shell script:
while [[ 1 ]]; do
cat life >> life.tmp;
mv -f life.tmp life
done;
Works for me!**
Namu Kanzeon Bosatsu
* – Meaning no definite beginning nor end. Just constant change.
** – In BASH this does work, but frankly it’s incredibly boring. If you can think of a better script, please feel free to post it here. I’d love to hear what Linux-heads can come up with.
Sometimes it seems the second line could be
cat /dev/random >> life.tmp;
other times it’s
echo namuamidabu >> life.tmp;
Anyway, I always liked the unix command true(1)
From the man page: ‘true – do nothing, successfully’
Hi Peter,
Excellent suggestions! I revised my “script” as follows:
$ while [[ true ]]; do
> cat /dev/random >> life.tmp;
> done;
Though, /dev/random should probably be replaced with /dev/karma or something.
P.S. Welcome to the L8B, or the new one at least.
True is an additional exec in olden versions of shells, though is built-in to ZSH and other shells these days (and does document the code better). The cat from /dev/random will never end, and could be appended directly to life instead of life.tmp.