case "$variable" in
"$condition1" )
command...
;;
"$condition2" )
command...
;;
esac
Notes:-
1-Each test line ends with a right paren ).
2-Each condition block ends with a double semicolon ;;.
3-The entire case block terminates with an esac (case spelled backwards).
4-Quoting the variables is not mandatory, since word splitting does not take
place.
I'm using the following command to zip a project file, but when it finishes, the resulting zip file contains all the directories above the file I wanted zipped, myapp.app, each one empty until you get to the actual app.
zip -r myapp.app.zip ... (0 Replies)
HELLO ALL,
URGENTLY NEEDED A SCRIPT TO SELECT AND DELETE LOWER AND MIXED CASE RECORDS FROM A COLUMN IN A TABLE.
FOR EXAMPLE : Table name is EMPLOYEE and the column name is CITY
and the CITY column records will be: Newyork
washington
... (1 Reply)
As of a week ago i thought a shell was somthing found on a beach.
I'm a virgin when it comes to scripting and i'm having a really bad time here.
What i need to do is prompt for a group number
grep the /etc/groups to get the GID and name
if it exists i want to prompt the user for... (3 Replies)
I have a pel script running as root that needs to read the contents of a file on a remote system, I have an ssh trust relationship as a particular user but not as root.
I then need to write back out to that file again to change it's content a bit.
On the surface this seemed really easy but... (3 Replies)
Well, I think I've managed to take two different issues and conglomerate them into and embarrasing mess.
#!/bin/bash
# Set some variables
dir1=/path/that/isnt/variable/$variabledir/dir/
dir2=/path/that/isnt/variable/$variabledir/important/"$variabledir"-subdirectory/path/
echo "Gimme... (7 Replies)
I'm trying to make a dialog window that prints the output of grep that takes the output of find. Unfortunately my nested backticks don't work.
Here is the dialog window:
dialog --stdout --title "test" --backtitle "test" --msgbox "Test:\n `grep -l "${tablica}" `find $string``" 16 60I think I... (2 Replies)
I have the basic command written in bash
for element in 1 2
do
if ]; then
set el = "t"
else
set el = "p"
fi
done
but i get the following error
syntax error near unexpected token `for'
` for element in 1 2'
What should i do differently? (3 Replies)
The variables given are already defined ($file1-$file3, $obsid1-$obsid3, and $n=3). When I go to run the code, the terminal outputs "Missing }." I believe the error is with the nesting of variables. It would save a lot of time getting this while loop working.
set i = 1
while (${i} <=... (5 Replies)
Discussion started by: ojdefdidit
5 Replies
LEARN ABOUT DEBIAN
tkgate
TKGATE(1) General Commands Manual TKGATE(1)NAME
tkgate - Tcl/Tk based digital circuit editor and simulator
SYNOPSIS
tkgate [-xqs] [-X script] [-l file] [-p file] [-P printer] [files...]
DESCRIPTION
TkGate is a graphical editor and event driven simulator for digital circuits with a tcl/tk-based interface. Supported circuit elements
include basic gates (AND, OR, etc.), tri-state gates, adders, multipliers, registers, memories and mos transistors. Hierarchical design is
also supported with support for user defined modules. Save files are based on the Verilog netlist format.
TkGate documentation can be found at:
http://www.cs.cmu.edu/~hansen/tkgate
OPTIONS
The options are as follows:
-X script Automaticaly start the simulator and execute the specified simulation script.
-p file Print circuit to file without starting GUI.
-P printer Print circuit to printer without starting GUI.
-l file Read the specified file as a library.
-x Automaticaly start the simulator.
-q Suppress startup messages.
-s Excute with a synchronous X server connection. This option is primarily for debugging.
-L lang Specify a locality to use if tkgate has been configued for Japanese support. The locality should be either "ASCII" for Eng-
lish, or "ja_JP.EUC" for Japanese. This option can also be set via the LANG environment variable.
HISTORY & CREDITS
TkGate begin life as an undergraduate project at Carnegie Mellon University (CMU) in 1987. At that time it was called simply 'gate' and
ran under the 'wm' window manager, a windowing system developed at CMU before X11 was widely used. In this incarnation it was used by stu-
dents in the computer architecture course at CMU to develop a simple microprocessor (dubbed "The Bat Computer"). After laying dormant for
several years, it was resurrected in 1991 and ported to run under X11 with the Xlib API. In this incarnation it was used several times by
students in the introductory digital logic course, but after the author graduated and left CMU, it went into hibernation again. This
Tcl/Tk incarnation was begun in 1998. While there is certainly some cruftyness in the implementation in places due to the multiple rein-
carnations, many new features have been added since the older wm and X11 versions, and the interface has been made much easier to use.
SEE ALSO gmac(1)AUTHOR
Jeffery Hansen (hansen@cmu.edu)
COPYRIGHT
Copyright (c) 1987-2004 by Jeffery Hansen
TKGATE(1)