Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!netsys!attctc!frog!john From: john@frog.UUCP (John Woods) Newsgroups: alt.sources Subject: Re: "bozo" program script Message-ID: <1672@frog.UUCP> Date: 24 Jul 89 14:19:00 GMT References: <6145@rpi.edu> <3654@shlump.dec.com> Followup-To: alt.sources.d Organization: Misanthropes-R-Us Lines: 42 In article <3654@shlump.dec.com>, michaud@decwrl.dec.com (Jeff Michaud) writes: > cute, here is another "bozo" varient > Ah, yes. Here are not one, but TWO programs that used to be on the CCC machine at MIT. The first is a number guessing game, the second tries to guess which CCC admin person you have thought of. Both are shell scripts. ---------------------------------------------------------------------------- echo "You think of a number, and I will guess it. Answer yes or no to" echo "my questions." trap "" 2 3 while true do echo "Is it seven?" read ans if [ x$ans = xy -o x$ans = xyes ] then echo I win! exit 0 fi done ---------------------------------------------------------------------------- echo "You think of the name of a sysperson, and I will guess it." echo "Answer yes or no to my questions." trap "" 2 3 while true do echo "Is it Evan?" read ans if [ x$ans = xy -o x$ans = xyes ] then echo I win! exit 0 fi done --------------------------------------------------------------------------- -- John Woods, Charles River Data Systems, Framingham MA, (508) 626-1101 ...!decvax!frog!john, john@frog.UUCP, ...!mit-eddie!jfw, jfw@eddie.mit.edu People...How you gonna FIGURE 'em? Don't bother, S.L.--Just stand back and enjoy the EVOLUTIONARY PROCESS...