Deminuer in Korn Shell??? Well.....


 
Thread Tools Search this Thread
The Lounge What is on Your Mind? Deminuer in Korn Shell??? Well.....
# 1  
Old 06-10-2004
Deminuer in Korn Shell??? Well.....

I know this is an Off Topic forum, but this didn't seem quite On topic so I put it here.....

You probably all remember some "joker" we had on the boards a few months back asking for Minesweeper or some other game written in the Korn shell.

Well, I was bored tonight so I decided to implement hangman in bash, complete with graphics , albeit very crudely drawn in ASCII......

If any of you want it, download the tarball .
Bear in mind that you'll need bash, and an "echo" command that allows for the -n and -e options. If you want to add more words to the database, just edit word_list and append them to the bottom of the list (don't have ANY blank lines though).

I knew it was possible to write a fairly decent shell game, and here it is. I'll get round to hosting it "properly" on my site at some point.

Cheers all
Peace
ZB
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

New to korn shell

I am new to korn shell and slowly learning. Is there a way to have a parent script prompt for input and then execute a child script and return the output then move forward and ask for more input and then execute the next child script? I think the answer is no but thought i would ask. (2 Replies)
Discussion started by: cptkirkh
2 Replies

2. Shell Programming and Scripting

Bourne shell & Korn shell

Could some one tell me the difference btw Bourne shell and the Kshell? Which is more flexible and reliable in terms of portability and efficiency. When i type the following command .. $ echo $SHELL yields me /bin/sh Does this tells me that I am in Bourne shell. If yes, how can i get... (6 Replies)
Discussion started by: bobby1015
6 Replies

3. Shell Programming and Scripting

How to activate Korn Shell functionnalities in Bourne Shell

Hi All I have writing a Korn Shell script to execute it on many of our servers. But some servers don't have Korn Shell installed, they use Borne Shell. Some operations like calculation don't work : cat ${file1} | tail -$((${num1}-${num2})) > ${file2} Is it possible to activate Korn Shell... (3 Replies)
Discussion started by: madmat
3 Replies

4. Shell Programming and Scripting

korn shell

I am using korn shell but I want to have my prompt to represnent that of my C shell because I like it better. Is there anyway to do this? (1 Reply)
Discussion started by: vthokiefan
1 Replies

5. Shell Programming and Scripting

how can i call one korn shell from a shell

Hi guys, please help me I have a ksh script (second picture down), in that script I define the function DATECALC. Now I want to use this function KSH in a program shell. How can I call this ksh from my shell program? My shell program is... in the first two lines I tried to call... (1 Reply)
Discussion started by: acevallo
1 Replies

6. UNIX for Dummies Questions & Answers

what are some different commands in c shell and korn shell??

I am doing this simple script using c shell and korn shell. The commands I use are fgrep , ls, and also some redirecting. Is there any difference in using both of these commands in c shell and korn shell? Thanks and sorry for the stupid question. (1 Reply)
Discussion started by: EquinoX
1 Replies

7. AIX

tsh shell to korn shell

i got stuck in IBM AIX unix and i was googling for the answer. but i didn't find one. can anyone tell me how to get back from tsh# shell to korn shell my system is showing tsh shell in the terminal but i am unable to get back to korn shell. i tried chsh, shell, su, logout, exit commands but not 1... (7 Replies)
Discussion started by: arifkhan
7 Replies

8. Shell Programming and Scripting

how to convert from korn shell to normal shell with this code?

well i have this code here..and it works fine in kornshell.. #!/bin/ksh home=c:/..../ input=$1 sed '1,3d' $input > $1.out line="" cat $1.out | while read a do line="$line $a" done echo $line > $1 rm $1.out however...now i want it just in normal sh mode..how to convert this?... (21 Replies)
Discussion started by: forevercalz
21 Replies

9. Shell Programming and Scripting

KORN Shell - Spawn new shell with commands

I want to be able to run a script on one server, that will spawn another shell which runs some commands on another server.. I have seen some code that may help - but I cant get it working as below: spawn /usr/bin/ksh send "telnet x <port_no>\r" expect "Enter command: " send "LOGIN:x:x;... (2 Replies)
Discussion started by: frustrated1
2 Replies

10. Shell Programming and Scripting

Korn Shell

Hi I am new to shell programming. I need help to write a script to monitor a process on Sun OS. If the process fails then call a oracle procedure. i check the process if running by typing ps -ef | grep ESP | grep -v grep root 29002 1 0 Mar 18 ? 7:20... (4 Replies)
Discussion started by: gpanesar
4 Replies
Login or Register to Ask a Question
TM::Bulk(3pm)						User Contributed Perl Documentation					     TM::Bulk(3pm)

NAME
TM::Bulk - Topic Maps, Bulk Retrieval Trait SYNOPSIS
my $tm = ..... # get a map from anywhere use TM::Bulk; use Class::Trait; Class::Trait->apply ($tm, 'TM::Bulk'); # give the map the trait # find out environment of topic my $vortex = $tm->vortex ('some-lid', { 'types' => [ 'types' ], 'instances' => [ 'instances*', 0, 20 ], 'topic' => [ 'topic' ], 'roles' => [ 'roles', 0, 10 ], 'members' => [ 'players' ], }, ); # find names of topics (optionally using a scope preference list) my $names = $tm->names ([ 'ccc', 'bbb', 'aaa' ], [ 's1', 's3', '*' ]); DESCRIPTION
Especially when you build user interfaces, you might need access to a lot of topic-related information. Instead of collecting this 'by foot' the following methods help you achieve this more effectively. names $name_hash_ref = $tm->names ($lid_list_ref, [ $scope_list_ref ] ) This method takes a list (reference) of topic ids and an optional list of scoping topic ids. For the former it will try to find the names (topic names for TMDM acolytes). If the list of scopes is empty then the preference is on the unconstrained scope. If no name for a topic is in that scope, some other will be used. If the list of scopes is non-empty, it directs to look first for a name in the first scoping topic, then second, and so on. If you want to have one name in any case, append "*" to the scoping list. If no name exist for a particular lid, then an "undef" is returned in the result hash. References to non-existing topics are ignored. The overall result is a hash (reference). The keys are of the form "topic-id @ scope-id" (without the blanks) and the name strings are the values. vortex $info = $tm->vortex (, $vortex_lid, $what_hashref, $scope_list_ref ) This method returns a lot of information about a particular toplet (vortex). The function expects the following parameters: lid: the lid of the toplet in question what: a hash reference describing the extent of the information (see below) scopes: a list (reference) to scopes (currently NOT honored) To control what exactly should be returned, the "what" hash reference can contain following components. All of them being tagged with <n,m> accept an additional pair of integer specify the range which should be returned. To ask for the first twenty, use "0,19", for the next "20,39". The order in which the identifiers is returned is undefined but stable over subsequent read-only calls. topic: fetches the toplet (which is only the subject locator, subject indicators information). names (<n,m>): fetches all names (as array reference triple [ type, scope, string value ]) occurrences (<n,m>): fetches all occurrences (as array reference triple [ type, scope, value ]) instances (<n,m>): fetches all toplets which are direct instances of the vortex (that is regarded as class here); instances* (<n,m>): same as "instances", but including all instances of subclasses of the vortex types (<n,m>): fetches all (direct) types of the vortex (that is regarded as instance here) types* (<n,m>): fetches all (direct and indirect) types of the vortex (that is regarded as instance here) subclasses (<n,m>): fetches all direct subclasses subclasses* (<n,m>): same as "subclasses", but creates reflexive, transitive closure superclasses (<n,m>): fetches all direct superclasses superclasses* (<n,m>): same as "superclasses", but creates reflexive, transitive closure roles (<n,m>): fetches all assertion ids where the vortex plays a role peers (<n,m>): fetches all topics which are also a direct instance of any of the (direct) types of this topic peers* (<n,m>): fetches all topics which are also a (direct or indirect) instances of any of the (direct) types of this topic peers** (<n,m>): fetches all topics which are also a (direct or indirect) instances of any of the (direct or indirect) types of this topic The function will determine all of the requested information and will prepare a hash reference storing each information into a hash component. Under which name this information is stored, the caller can determine with the hash above as the example shows: Example: $vortex = $tm->vortex ('some-lid', { 'types' => [ 'types' ], 'instances' => [ 'instances*', 0, 20 ], 'topic' => [ 'topic' ], 'roles' => [ 'roles', 0, 10 ], }, ); The method dies if "lid" does not identify a proper toplet. SEE ALSO
TM::Overview COPYRIGHT AND LICENSE
Copyright 200[3-57] by Robert Barta, <drrho@cpan.org> This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.10.1 2008-04-23 TM::Bulk(3pm)