Sponsored Content
Full Discussion: Interactive UNIX shell query
Top Forums UNIX for Dummies Questions & Answers Interactive UNIX shell query Post 302657295 by leo_ultra_leo on Sunday 17th of June 2012 05:19:34 AM
Old 06-17-2012
Interactive UNIX shell query

Hi guys,

I've create 3 shells concerning my work, which named as 1.sh, 2.sh and 3.sh.
However, how can I make an interactive query for these shells just like the old (fdisk) in windows9x. I want to make an interface tells the user just like this:

Code:
Press 1 to execute "1.sh"
Press 2 to execute 2.sh. 
Press 3 to execute 3.sh

Press any key to exit.

Looking for your valued solutions guys...

Leo
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to hide user inputted text for interactive unix shell script?

Hi everybody, Do you know how to hide the text for interactive unix shell script? Just like the case for inputting password during logon. Patrick (1 Reply)
Discussion started by: patrickpang
1 Replies

2. UNIX for Dummies Questions & Answers

sql query results in unix shell script

Hi I want to get the a field from a SQL query into unix shell script variable. the whole situation is like this. 1. Opened a cursor to a table in DB2 databse. 2. Fetching individual rows with the help of cursor. 3. Each row has 4 fields. I want each of the field in individual shell... (1 Reply)
Discussion started by: skyineyes
1 Replies

3. Shell Programming and Scripting

isql query in unix shell script

Dear all I want to execute some isql command from unix shell script. Kindly suggest me. isql command mention below. isql -U -P use gdb_1 go select count (*) from table_x go (3 Replies)
Discussion started by: jaydeep_sadaria
3 Replies

4. Shell Programming and Scripting

A simple query on unix shell script

I want to write a script to go to particular path in file and run shell script from there. what will be shell script for the same. (2 Replies)
Discussion started by: shekhar_ssm
2 Replies

5. Shell Programming and Scripting

how to use data in unix text file as input to an sql query from shell

Hi, I have data in my text file something like this. adams robert ahmed gibbs I want to use this data line by line as input to an sql query which i run by connecting to an oracle database from shell. If you have code for similar scenario , please ehlp. I want the output of the sql query... (7 Replies)
Discussion started by: rdhanek
7 Replies

6. Homework & Coursework Questions

Help with Interactive / Non Interactive Shell script

Q. Write a script that behaves both in interactive and non interactive mode. When no arguments are supplied it picks up each C program from the directory and prints first 10 lines. It then prompts for deletion of the file. If user supplies arguments with the script , then it works on those files... (1 Reply)
Discussion started by: rits
1 Replies

7. UNIX for Dummies Questions & Answers

executing SQL query using unix shell script

I want to perform few post-session success tasks like update a status to 'true' in one of the sql database table, update date values to current system date in one of the configuration table in sql. How do i achieve this in a post session command?syntax with example will be helpful. (3 Replies)
Discussion started by: nathanvaithi
3 Replies

8. Shell Programming and Scripting

Query Oracle tables and return values to shell script that calls the query

Hi, I have a requirement as below which needs to be done viz UNIX shell script (1) I have to connect to an Oracle database (2) Exexute "SELECT field_status from table 1" query on one of the tables. (3) Based on the result that I get from point (2), I have to update another table in the... (6 Replies)
Discussion started by: balaeswari
6 Replies

9. Shell Programming and Scripting

Isql query in unix shell

Hi i want write a script for list of sysbase are having access or open. then i wrote like: USER="abc" PASS="xyz" SERVER="SCCS" DB="blue" WORK_DIR="/usr/home/ramakrishna" set -x isql -U${USER} -P${PASS} -S${SERVER}<<EOF>$WORK_DIR/output.log go use blue (database name) go use... (0 Replies)
Discussion started by: koti_rama
0 Replies

10. Shell Programming and Scripting

Unix shell script to query linux top consuming processes

Hi All, O/S: Linux 86x64 Red Hat I have a sql script that queries top consuming processes of Linux using TOP commnd. Now I need to automate this task and pass the top processes i.e., PID to the sql script through unix shell script. Could anyone please let me know how to achieve this. ... (2 Replies)
Discussion started by: a1_win
2 Replies
XCUBES(6)							   Games Manual 							 XCUBES(6)

NAME
xcubes - Cubes X widget SYNOPSIS
/usr/games/xcubes [-geometry [{width}][x{height}][{+-}{xoff}[{+-}{yoff}]]] [-display [{host}]:[{vs}]] [-[no]mono] [-[no]{reverse|rv}] [-{foreground|fg} {color}] [-{background|bg} {color}] [-block {color}] [-text {color}] [-[no]install] [-picture {filename}] [-delay msecs] [-[no]sound] [-bumpSound {filename}] [-dripSound {filename}] [-{font|fn} {fontname}] [-size{x|y|z} {int}] [-base {int}] [-userName {string}] [-scoreFile {filename}] [-scores] [-version] DESCRIPTION
A 3D sliding block puzzle. The cubes represented are flattened out on the plane. If the Blocks Z slider is greater than 1, then each group of boxes is a layer of the puzzle. If the Blocks Z slider = 1, then this is a simple 15 tile puzzle. The 15 puzzle was originally made around 1880 by Noyes Chapman (the 14-15 puzzle of Sam Loyd was made soon after). Similar 3D puzzles include BloxBox; Qrazy Qube (2x2x2) by P. Hein of Denmark and Varikon Box 'L (3x3x3) (Hungary) and Mad Marbles (3x3x3) by Toys & Games International USA. FEATURES
Click "mouse-left" button to move a block. Clicks on a space, or clicks on blocks that are not in line with a space, will not move the blocks. Notice, one can move more than one block at a time by clicking on the block farthest from the space but still in line with the space. Since you only have a 2-D screen, the next level down is either the box to the right of the current box or the bottom of the cur- rent box. Click "mouse-right" button, or press "C" or "c" keys, to clear the puzzle. Press "G" or "g" keys to get a saved puzzle. Press "W" or "w" keys to save (write) a puzzle. Press "U" or "u" keys to undo a move. Press "R" or "r" keys to redo a move. Press "Z" or "z" keys to randomize the puzzle. New records can only be set from a cleared state. Press "S" or "s" keys to start the auto-solver. Only works on lxmx1 where l > 3 and m > 3. Press "I" or "i" keys to move a block in. Press "O" or "o" keys to move a block out. Press ">" or "." keys to speed up the movement of blocks. Press "<" or "," keys to slow down the movement of blocks. Press "@" key to toggle the sound. Press "Esc" key to hide program. Press "Q", "q", or "CTRL-C" keys to kill program. Use the key pad or arrow keys to move without the mouse. Key pad is defined for Cubes as: / Out 8 Up ^ 4<5>6 Left, In, Right v 2 Down The control key allows you to change the complexity of xcubes. Hold down control key and use the keypad or arrow keys to reduce or enlarge puzzle complexity. The title is in the following format (non-motif version): xcubes: <Number of columns>x<Number of rows>x<Number of stacks> @ (<Number of moves>/{<Record number of moves> <user name>|"NEVER noaccess"}) - <Comment> If there is no record of the current puzzle, it displays "NEVER noaccess". OPTIONS
-geometry {+|-}X{+|-}Y This option sets the initial position of the cubes window (resource name "geometry"). -display host:dpy This option specifies the X server to contact. -[no]mono This option allows you to display the cubes window on a color screen as if it were monochrome (resource name "mono"). -[no]{reverse|rv} This option allows you to see the cubes window in reverse video (resource name "reverseVideo"). -{foreground|fg} color This option specifies the foreground of the cubes window (resource name "foreground"). -{background|bg} color This option specifies the background of the cubes window (resource name "background"). -block color This option specifies the block color of the blocks in the cubes window (resource name "blockColor"). -text color This option specifies the text color of the blocks in the cubes window (resource name "textColor"). -[no]install This option specifies if the colormap should be installed or not (resource name "install"). -picture filename This option specifies the file for the picture (resource name "picture"). -delay msecs This option specifies the number of milliseconds it takes to move a block or a group of blocks one space (1-50) (resource name "delay"). -[no]sound This option specifies if a sliding block should make a sound or not (resource name "sound"). -bumpSound filename This option specifies the file for the bump sound for the sliding of the tiles (resource name "bumpSound"). -dripSound filename This option specifies the file for the drip sound for the dropping or raising of the tiles (resource name "dripSound"). -{font|fn} ontname This option specifies the font that will be used (resource name "font"). -size{x|y|z} <int> This option allows you to change the number of cubes in a row, column, or stack (resource name "sizeX", "sizeY", "sizeZ"). -base int This option specifies the base used in cubes (default is base 10) (resource name "base"). -userName string This option specifies the user name for any records made or else it will get your login name (resource name "userName"). -scoreFile filename Specify an alternative score file (resource name "scoreFile"). -scores This option lists all the recorded scores and then exits. -version This option tells you what version of xcubes you have. RECORDS
You must randomize the puzzle before a record is set, otherwise an assumption of cheating is made if it is solved after a get or an auto-solve. SAVE FORMAT
Here is the format for the xcubes configuration, starting position, and the movement of its pieces. sizeX: 1-8 <number of columns of blocks> sizeY: 1-8 <number of rows of blocks> sizeZ: 1-8 <number of blocks in a stack> moves: 0-MAXINT <total number of moves> startingPosition: <array of block positions where 0 is the empty space> This is then followed by the moves, starting from 1. move #: <direction> Direction is represented as 0 up, 1 right, 2 down, 3 left, 4 in, and 5 out. REFERENCES
L. E. Horden, Sliding Piece Puzzles (Recreations in Mathematics Series), Oxford University Press 1986, pp 1, 157-159. Jerry Slocum & Jack Botermans, Puzzles Old & New (How to Make and Solve Them), University of Washington Press, Seattle, 1987, pp 126, 127. SEE ALSO
X(1), xtriangles(6), xhexagons(6), xmlink(6), xbarrel(6), xpanex(6), xmball(6), xpyraminx(6), xoct(6), xrubik(6), xskewb(6), xdino(6), xabacus(6) COPYRIGHTS
(R) Copyright 1994-2010, David A. Bagley BUG REPORTS AND PROGRAM UPDATES
Send bugs (or their reports, or fixes) to the author: David A. Bagley, <bagleyd@tux.org> The latest version is currently at: http://www.tux.org/~bagleyd/puzzles.html ftp://ibiblio.org/pub/Linux/games/strategy V7.6.3 29 Jun 2010 XCUBES(6)
All times are GMT -4. The time now is 05:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy