Code:
#!/bin/sh -
# $NetBSD: wargames.sh,v 1.3 1999/11/16 17:27:14 abs Exp $
#
# Copyright (c) 1985, 1993
# The Regents of the University of California. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. All advertising materials mentioning features or use of this software
# must display the following acknowledgement:
# This product includes software developed by the University of
# California, Berkeley and its contributors.
# 4. Neither the name of the University nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
# @(#)wargames.sh 8.1 (Berkeley) 5/31/93
#
echo -n "Would you like to play a game? "
read x
x=`echo $x | sed 's/[^-a-z0-9]//g'`
if [ -f /usr/games/$x ] ; then
tput clear
exec /usr/games/$x
else
# Original quote "Strange game, the only winning move is not to play."
echo "Strange, the only winning move is not to play."
fi
exit 0 *Kicher* .. sehr nett.
Code:
ls -ls /usr/games/
insgesamt 2590
1 drwxr-xr-x 2 root root 1216 2006-10-07 16:52 .
0 drwxr-xr-x 13 root root 368 2006-08-26 20:17 ..
96 -rwxr-xr-x 1 games games 96068 2006-04-23 05:22 adventure
8 -rwxr-xr-x 1 games games 6600 2006-04-23 05:22 arithmetic
40 -rwxr-sr-x 1 games games 40656 2006-04-23 05:22 atc
44 -rwxr-xr-x 1 games games 43560 2006-04-23 05:22 backgammon
16 -rwxr-xr-x 1 games games 16204 2006-04-23 05:22 banner
156 -rwxr-sr-x 1 games games 158992 2006-04-23 05:22 battlestar
8 -rwxr-xr-x 1 games games 5052 2006-04-23 05:22 bcd
24 -rwxr-xr-x 1 games games 23780 2006-04-23 05:22 boggle
8 -rwxr-xr-x 1 games games 5108 2006-04-23 05:22 caesar
24 -rwxr-sr-x 1 games games 23820 2006-04-23 05:22 canfield
8 -rwxr-xr-x 1 games games 5248 2006-04-23 05:22 cfscores
8 -rwxr-xr-x 1 games games 4259 2006-04-23 05:22 countmail
28 -rwxr-sr-x 1 games games 27360 2006-04-23 05:22 cribbage
8 -rwxr-xr-x 1 games games 7112 2006-04-23 05:22 dm
1413 -rwxr-xr-x 1 root root 1445744 2006-05-02 12:50 enigma
32 -rwxr-xr-x 1 games games 31304 2006-04-23 05:22 factor
12 -rwxr-xr-x 1 games games 8832 2006-04-23 05:22 fish
24 -rwxr-xr-x 1 games games 23816 2006-04-23 05:22 gomoku
12 -rwxr-xr-x 1 games games 9300 2006-04-23 05:22 hangman
28 -rwxr-xr-x 1 games games 26812 2006-04-23 05:22 hunt
40 -rwxr-xr-x 1 games games 40288 2006-04-23 05:22 huntd
28 -rwxr-xr-x 1 games games 27928 2006-04-23 05:22 mille
36 -rwxr-xr-x 1 games games 32808 2006-04-23 05:22 monop
8 -rwxr-xr-x 1 games games 5416 2006-04-23 05:22 morse
8 -rwxr-xr-x 1 games games 6660 2006-04-23 05:22 number
80 -rwxr-sr-x 1 games games 78112 2006-04-23 05:22 phantasia
8 -rwxr-xr-x 1 games games 4704 2006-04-23 05:22 pig
8 -rwxr-xr-x 1 games games 6248 2006-04-23 05:22 pom
4 -rwxr-xr-x 1 games games 3692 2006-04-23 05:22 ppt
48 -rwxr-xr-x 1 games games 47144 2006-04-23 05:22 primes
12 -rwxr-xr-x 1 games games 10140 2006-04-23 05:22 quiz
8 -rwxr-xr-x 1 games games 6052 2006-04-23 05:22 rain
8 -rwxr-xr-x 1 games games 4892 2006-04-23 05:22 random
20 -rwxr-sr-x 1 games games 18732 2006-04-23 05:22 robots
4 -rwxr-xr-x 1 games games 2001 2006-04-23 05:22 rot13
72 -rwxr-sr-x 1 games games 69956 2006-04-23 05:22 sail
20 -rwxr-sr-x 1 games games 17588 2006-04-23 05:22 snake
8 -rwxr-xr-x 1 games games 4324 2006-04-23 05:22 snscore
52 -rwxr-xr-x 1 games games 51688 2006-04-23 05:22 teachgammon
20 -rwxr-sr-x 1 games games 18820 2006-04-23 05:22 tetris-bsd
56 -rwxr-xr-x 1 games games 54204 2006-04-23 05:22 trek
4 -rwxr-xr-x 1 games games 2204 2006-04-23 05:22 wargames
12 -rwxr-xr-x 1 games games 8368 2006-04-23 05:22 worm
8 -rwxr-xr-x 1 games games 7708 2006-04-23 05:22 worms
4 -rwxr-xr-x 1 games games 760 2006-04-23 05:22 wtf
16 -rwxr-xr-x 1 games games 14268 2006-04-23 05:22 wump
Ich glaube, Du solltest mal als Eingabe auf die Frage, ob Du ein Spiel spielen möchtest, eines der Games aus der Liste versuchen.
Der Programmierer hatte Humor und er hat sich am Film orientiert, so viel steht fest.
Greetz,
RM
Lesezeichen