Sponsored Content
Full Discussion: Case (ksh)
Top Forums Shell Programming and Scripting Case (ksh) Post 44861 by linuxpenguin on Thursday 11th of December 2003 03:25:22 PM
Old 12-11-2003
case ${var} in
!pattern1)
statements
;;
!pattern2)
statements
;;
*)
statements
;;
esac
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

ksh case problem

I'm trying to run a ksh script with a case condition to handle parameters. #!/bin/ksh db_start(){ *code } db_shut(){ *code } case "$1" in up) db_start TRNG ;; down) db_shut TRNG ;; *) echo "Usage: $0 { up | down }" (3 Replies)
Discussion started by: digiteck
3 Replies

2. UNIX for Dummies Questions & Answers

anchoring regex using case and ksh

Outside this process I built a file containing snmp response filtering for hostname, model type and ios version. I want to get a count across the network of those devices running 11.x code, 12.0 mainline, 12.0 T train and above, 12.1 and above and OS levels. This works ok .. but its cheap... (2 Replies)
Discussion started by: popeye
2 Replies

3. Shell Programming and Scripting

ksh case statement

I am trying to write a ksh script using the case statement to select certain directories to remove. The directories that I am looking for are in the following format 2008-10-10. I want to exclude all other files/directories that contain anything other the 4 digit year,a dash, 2 digit month, a... (2 Replies)
Discussion started by: dgilc
2 Replies

4. UNIX for Dummies Questions & Answers

ksh case structure

Hello Experts, I ve been trying to build another shell where I am using the following code. transact="tv5cpc1" case "$transact" in "...cp..") xActType="" ;; "...de..") xActType="sp_dep" ;; "...ep..") xActType="sp_epa" ;; "....v.") ... (4 Replies)
Discussion started by: hkansal
4 Replies

5. UNIX for Dummies Questions & Answers

case statement in UNIX scripting (ksh)

Hi, I have a script like below : #!/bin/ksh echo "Do you want to export all docs ?" read alld echo "Do you want to export template or report only " read temr case && ] #arguments ;; case && ] #arguments ;; case && ] #arguments ;; (4 Replies)
Discussion started by: luna_soleil
4 Replies

6. Shell Programming and Scripting

lower to upper case in ksh

What is the command to change the contents of a file to UPPER case. Here in this file below you see some characters are Sp, Ch 1200812270046581 22885072800000652 B86860003OLFXXX592123320081227 22885029800000652 B86860003ODL-Sp592123420081227 22885093700000652-B94030001ODL-Ch592123520081227... (4 Replies)
Discussion started by: kshuser
4 Replies

7. Shell Programming and Scripting

Using an array with a case statement in KSH

Hi, I'm really new ro shell scripting (actually any kind of programming) and am pretty sure I'm making a pretty basic error here but I can't for the life of me figure it out. What I'm trying to do is get an array working with a case statement in a KSH script. The code is as follows: ... (3 Replies)
Discussion started by: SReilly
3 Replies

8. Shell Programming and Scripting

Use case insensitive variable in ksh shell scripting using sed or awk

I am using a variable called $variable in a pattern search to print from a starting variable to a constant value. the variable search should be case in sensitive. i tired using Ip at the end in the below command. but in ksh it is not working. sed -n "/$variable/,/constant/p" file i also... (11 Replies)
Discussion started by: johnjs
11 Replies

9. Shell Programming and Scripting

Ksh: Send a mail in case grep finds something

I want to search a file if it contains special strings and if yes, the records found should be mailed. I can either do it with a temporary file: /usr/bin/grep somestring somefile > /tmp/tempfile && /usr/bin/mail -s "Found something" email@mycomp.com < /tmp/tempfile... or by running the grep... (10 Replies)
Discussion started by: Cochise
10 Replies

10. Shell Programming and Scripting

ksh case statement issue

Hi. I wrote the following case statement to replace a series of 'ELIF' statements as it looks better and is easier to maintain. However, for some reason the commands don't fully work in this format. Take option 1. It should call a script that runs in the background but it doesn't work. Can anyone... (3 Replies)
Discussion started by: user052009
3 Replies
EXECUTE(7)						  PostgreSQL 9.2.7 Documentation						EXECUTE(7)

NAME
EXECUTE - execute a prepared statement SYNOPSIS
EXECUTE name [ ( parameter [, ...] ) ] DESCRIPTION
EXECUTE is used to execute a previously prepared statement. Since prepared statements only exist for the duration of a session, the prepared statement must have been created by a PREPARE statement executed earlier in the current session. If the PREPARE statement that created the statement specified some parameters, a compatible set of parameters must be passed to the EXECUTE statement, or else an error is raised. Note that (unlike functions) prepared statements are not overloaded based on the type or number of their parameters; the name of a prepared statement must be unique within a database session. For more information on the creation and usage of prepared statements, see PREPARE(7). PARAMETERS
name The name of the prepared statement to execute. parameter The actual value of a parameter to the prepared statement. This must be an expression yielding a value that is compatible with the data type of this parameter, as was determined when the prepared statement was created. OUTPUTS
The command tag returned by EXECUTE is that of the prepared statement, and not EXECUTE. EXAMPLES
Examples are given in the EXAMPLES section of the PREPARE(7) documentation. COMPATIBILITY
The SQL standard includes an EXECUTE statement, but it is only for use in embedded SQL. This version of the EXECUTE statement also uses a somewhat different syntax. SEE ALSO
DEALLOCATE(7), PREPARE(7) PostgreSQL 9.2.7 2014-02-17 EXECUTE(7)
All times are GMT -4. The time now is 02:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy