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
iwidgets::hyperhelp(1)						  [incr Widgets]					    iwidgets::hyperhelp(1)

__________________________________________________________________________________________________________________________________________________

NAME
iwidgets::hyperhelp - Create and manipulate a hyperhelp widget SYNOPSIS
iwidgets::hyperhelp pathName ?options? INHERITANCE
itk::Toplevel <- iwidgets::Shell <- iwidgets::Hyperhelp STANDARD OPTIONS
activeBackground background borderWidth closecmd cursor exportSelection foreground highlightColor highlightThickness insertBackground insertBorderWidth insertOffTime insertOnTime insertWidth padX padY relief repeatDelay repeatInterval selectBackground selectBorderWidth selectForeground setGrid See the "options" manual entry for details on the standard options. ASSOCIATED OPTIONS
hscrollmode vscrollmode textbackground fontname fontsize fixedfont link linkhighlight width height state wrap unknownimage See the "scrolledhtml" widget manual entry for details on the above associated options. INHERITED OPTIONS
modality title See the "shell" manual entry for details on the above inherited options. WIDGET-SPECIFIC OPTIONS Name: topics Class: Topics Command-Line Switch: -topics Specifies a list of help topics in the form {?topic? ... }. Topic may either be a topic name, in which case the document associated with the topic should be in the file helpdir/topic.html, or it may be of the form {name file}. In the latter case, name is displayed in the topic menu, and selecting the name loads file. If file has a relative path, it is assumed to be relative to helpdir. Name: helpdir Class: Directory Command-Line Switch: -helpdir Specifies the directory where help files are located. Name: closeCmd Class: CloseCmd Command-Line Switch: -closecmd Specifies the tcl command to be executed when the close option is selected from the topics menu. Name: maxHistory Class: MaxHistory Command-Line Switch: -maxhistory Specifies the maximum number of entries stored in the history list Name: beforelink Class: BeforeLink Command-Line Switch: -beforelink Specifies a command to be eval'ed before a new link is displayed. The path of the link to be displayed is appended before evaling the command. A suggested use might be to busy the widget while a new page is being displayed. Name: afterlink Class: AfterLink Command-Line Switch: -afterlink Specifies a command to be eval'ed after a new link is completely displayed. The path of the link that was displayed is appended before evaling the command. __________________________________________________________________________________________________________________________________________________ DESCRIPTION
The iwidgets::hyperhelp command creates a shell window with a pulldown menu showing a list of topics. The topics are displayed by importing a HTML formatted file named helpdir/topic.html. For a list of supported HTML tags, see scrolledhtml(n). METHODS
The iwidgets::hyperhelp command creates a new Tcl command whose name is pathName. This command may be used to invoke various operations on the widget. It has the following general form: pathName option ?arg arg ...? Option and the args determine the exact behavior of the com- mand. The following commands are possible for dialog widgets: INHERITED METHODS
activate center childsite deactivate See the "shell" manual entry for details on the above inherited methods. WIDGET-SPECIFIC METHODS pathName cget option Returns the current value of the configuration option given by option. Option may have any of the values accepted by the iwid- gets::hyperhelp command. pathName configure ?option? ?value option value ...? Query or modify the configuration options of the widget. If no option is specified, returns a list describing all of the available options for pathName (see Tk_ConfigureInfo for information on the format of this list). If option is specified with no value, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). If one or more option-value pairs are specified, then the command modifies the given widget option(s) to have the given value(s); in this case the command returns an empty string. Option may have any of the values accepted by the iwidgets::hyperhelp command. pathName showtopic topic Display html file helpdir/topic.html. Topic may optionally be of the form topicname#anchorname. In this form, either topicname or anchorname or both may be empty. If topicname is empty, the current topic is assumed. If anchorname is empty, the top of the docu- ment is assumed pathName followlink href Display html file href. Href may be optionally be of the form filename#anchorname. In this form, either filename or anchorname or both may be empty. If filename is empty, the current document is assumed. If anchorname is empty, the top of the document is assumed. pathName forward Display html file one forward in history list, if applicable. pathName back Display html file one back in history list, if applicable. EXAMPLE
package require Iwidgets 4.0 iwidgets::hyperhelp .h -topics { Intro Help } -helpdir ~/help .h showtopic Intro AUTHOR
Kris Raney KEYWORDS
hyperhelp, html, help, shell, widget Tk iwidgets::hyperhelp(1)