fun with scripts

Eirik Fuller eirik at lurch.Stanford.EDU
Thu Feb 9 19:47:05 AEST 1989


I wrote the enclosed script fragment for a semi-serious purpose, then
decided it was amusing enough to post.  Rather than ruining your fun
by explaining it, I thought I'd leave that up to you.  Figuring it out
could be educational.

Please don't post responses telling what it's for; this isn't a survey
of how many Unix experts know how to post news articles.  If you
insist on answering this question, do so by email; I'll post an
anonymous summary of the most amusing wrong answers.  I already know
what I believe to be the right answer.

This fragment serves its intended purpose on a UTek workstation and on
a Sun 4 running SunOS; the only other system I tried it on, an Ultrix
machine, didn't like it.  There are doubtless other systems it doesn't
work on, and perhaps other systems it does work on.  I doubt I'll port
it anywhere it doesn't already work.

My sincere apologies in advance if this is old hat; it's new to me.

Here's the fragment:


if (0) then
:; fi 2>/dev/null; endif() { :; } ; setenv() { eval "$1='$2'"; export $1; }
endif



More information about the Comp.unix.questions mailing list