Sam Trenholme's webpage
This article was posted to the Usenet group alt.hackers in 1995; any technical information is probably outdated.

Re: Smallest Unix Shell

Article: 8780 of alt.hackers
Newsgroups: alt.hackers
From: (Morgan Schweers)
Subject: Re: Smallest Unix Shell
Organization: Foxsoft Cyberware
Date: Thu, 5 Oct 1995 22:37:27 GMT
Approved: Gosh, I hope so...
Lines: 36
Status: RO


Some time ago (Reijo Kalvas) happily mumbled:
>In article <43q9vk$>,
>Warren Toomey <> wrote:
>>ObHack: A challenge with a friend to come up with the smallest
>>Unix shell in C.
>>Here's the results, the smallest being 123 characters (124 with a \n):
>38 characters and breaks probably all rules.  Well, this is
>alt.hackers, eh?  ctrl-d exits.

ObHack Explanation:

    Actually, you cannot replace your shell with this program.
It goes into a painful endless loop, I believe.

    (Specifically you couldn't make it your 'real' shell, because the
'system' function shells to your real shell (I believe), which would
be this, and then it would prompt you again.  (Note: The need for a
prompt expands your program a bit too...))

    The shells being described before were actually fully functional
replacements for the Unix shell.

                                   --  Morgan Schweers
Morgan Schweers |  New Chrome Grass!  Finger for my PGP key   |
Live fast, die   \ B1 S4 a b g j++! k l? p r- s t+ u v- w+ x y- z, approx.__/
old, and leave a smouldering pile of metal as a corpse...  It's never enough,
until your heart stops beating, the deeper you get, the sweeter the pain...

Parent Parent


Back to index