Classic. But still truly frightening.
Towers of Hanoi in sendmail.cf
From shrchin Thu Jan 25 05:38:40 1996
Subject: Re: ASR London – The Next Generation
Message-ID: <[email protected]>
From: [email protected] (Jonathan H. N. Chin)
<[email protected]> <[email protected]> <[email protected]>
[email protected] (Nick Cuccia) writes:
>–Nick (still working on towers of hanoi in sendmail.cf…)
I was planning to go home early for once.
# Towers of Hanoi
RHANOI:$+ $:1 2 3$1
R$-$-$- [email protected]$1$2$3
[email protected]$* $:$>49 $1$3$2$4
R$-$-$-$* $:$>49 $2$3$1$4[Move Top Disk Of Peg $1 To Peg $3]
R$-$-$-$* $:[email protected]$4
Add to your /etc/sendmail.cf equivalent.
If S49 is in use, change the three `49’s to an unused ruleset.
Invoke with something like:
echo ’49 HANOI:@@@@’ | /usr/sbin/sendmail -bt -d21
Add `@’s to taste.
Assumes you have three pegs and want to move the stack from
the first peg to the second.
v8 output is cleaner than SunOS.
Was too lazy to make it count (ie. let `HANOI:14′, etc, work);
Didn’t seem too hard, but kind of long-winded and tedious.
Anyone know the iterative (non-recursive) solution?
And that, friends, is why I use Postfix.