Sponsored Content
Top Forums Shell Programming and Scripting Shell script dynamically case in VAR Post 302248924 by ACTGADE on Monday 20th of October 2008 06:38:54 AM
Old 10-20-2008
Shell script dynamically case in VAR

Hallo,

I am working on a kdialog. This shall be able to load the required commands from a .conf file.

First step runs good by loading the entries (selectabel entries) in a variable:

MIRRORSELECT=$(kdialog --radiolist "Select your nearest mirror" $VAR1)

The kdialog is accordingly correct

MY PROBLEM IS NOW, to set all inside the case in ... done dynamically e.g. via a variable or a function etc.

MIRRORSELECT=$(kdialog --radiolist "Select your nearest mirror" $VAR1)
case $MIRRORSELECT in
$VAR2
esac

I tryed to fill the required data ((VAR2=$(echo " 1) echo "Hallo ;; ...;; ) in the variable and call it inside the case ... in ... $VAR ... done.

It always causes an error message.

Can you help me here?


Tks and krgds
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

lower case to upper case string conversion in shell script

How can convert a Lower case variable value to an upper case in the kron shell script. (3 Replies)
Discussion started by: dchalavadi
3 Replies

2. Shell Programming and Scripting

Accessing var from .profile into shell script

I have defined variable in .profile file. This variable, I tried to use in a shell script for the same session. In Shell script it is not finding this variable, but the same variable on the console if I try to access by echo $var, it is giving me correct assigned value. Can anyone, please... (7 Replies)
Discussion started by: videsh77
7 Replies

3. Shell Programming and Scripting

Dynamically creating text files using shell script

Hi All, I want to create a shell script which dynamically create text files. i am using the following script $i=1 while do cat > test_$i.txt done but while running the script it was stopping(the cursor not going to next step, i have to enter ctrl+c to make it stop). it is creating only... (2 Replies)
Discussion started by: KiranKumarKarre
2 Replies

4. Shell Programming and Scripting

how to create the files dynamically in c shell script

how can i CREATE a txt file dynamically in c shell: for instance: #! /bin/csh for each i (*) cat>file$i.txt for each j do .... (1 Reply)
Discussion started by: jdsignature88
1 Replies

5. Shell Programming and Scripting

Passing filename dynamically in SPOOL of SQL*PLUS in shell script

Hi all, I am executing shell script in which I am using SQLLDR In this SQLLDR I am passing text file having PL/SQL script. This script will produce some formated output, this output I have to spool in another text file. Currently I have given this in script file as following Spool... (2 Replies)
Discussion started by: shekharjchandra
2 Replies

6. Shell Programming and Scripting

Shell script variable names created dynamically

Hi, I'm trying to use a config file to define frequencies for checking log files. If the config file contains a frequency it will be used else a default value. The format of the config file (and hence the environment variable) is FREQ_log_logname=value A test shell script as below:... (2 Replies)
Discussion started by: u671296
2 Replies

7. Shell Programming and Scripting

Generating & executing the SELECT and UPDATE clause dynamically using shell script

Hi All, I need to write one shell script. The requirement is as follows. a) I am having list the employee names in a file stored in /tmp directory location as below /tmp/emp.txt b) and the contents are as below cat emp.txt ravi raj ram arun c) I need to connect to sybase... (1 Reply)
Discussion started by: Gowtham_giri
1 Replies

8. Shell Programming and Scripting

Creating IN list in PLSQL script dynamically by using shell script

Hi all, I have a PLSQL script which has a IN list where it takes some ids as input. For example SELECT * FROM EMPLOYEE WHERE EMPLOYEE_ID IN (comma separated list ) I want to run this quest inside a shell script but I would like to prepare the IN list dynamically where the employee ids... (1 Reply)
Discussion started by: LoneRanger
1 Replies

9. Shell Programming and Scripting

Parameterizing to dynamically generate the extract file from Oracle table using Shell Script

I have below 2 requirements for parameterize the generate the extract file from Oracle table using Shell Script. Could you please help me by modifying the script and show me how to execute it. First Requirement: I have a requirement where I need to parameterize to generate one... (0 Replies)
Discussion started by: hareshvikram
0 Replies

10. Shell Programming and Scripting

Shell script to apply functions to multiple columns dynamically

Hello, I have a requirement to apply hashing algorithm on flat file on one or more columns dynamically based on header sample input file ID|NAME|AGE|GENDER 10|ABC|30|M 20|DEF|20|F say if i want multiple columns based on the header example id,name or id,age or name,gender and hash and... (13 Replies)
Discussion started by: mkathi
13 Replies
SIMPLE-CDD(1)						      General Commands Manual						     SIMPLE-CDD(1)

NAME
simple-cdd - create custom debian-installer CDs SYNOPSIS
simple-cdd [options] OPTIONS
--conf Specify a configuration file --dist Specify a distribution (etch, lenny, sid) --graphical-installer|-g Enable graphical installer by default --serial-console|-s Set defaults for serial console --do-mirror Generate a local mirror --no-do-mirror Do not generate a local mirror --profiles|-p Select profiles (Examples in /usr/share/simple-cdd/profiles/ directory) --build-profiles|-b Profiles only used while building the CD --auto-profiles|-a Pre-select and automatically install these profiles --local-packages List of packages to be included on CD's local package repository --locale Select locale (language and country) --keyboard Select keyboard (console-keymaps-at/keymap debconf question) --debian-mirror Specify debian mirror (The default is: ftp://ftp.us.debian.org/debian) --security-mirror Specify securty mirror (The default is: http://security.debian.org/) --mirror-tools List the mirror tools to be used (The defaults are both wget and reprepro) --kernel-packages List of kernel packages to be included on the CD --help|-h Display the usage message --qemu|-q Use qemu to test the built image --force-preseed Only issue a warning if a preseeding file is invalid --profiles-udeb-dist Specify distribution to pull simple-cdd-profiles udeb from --extra-udeb-dist Specify additional distribution to pull udebs from EXAMPLES
simple-cdd --profiles x-basic -g Build a custom image using the default options, except for using the graphical installer by default and the x-basic profile (/usr/share/simple-cdd/x-basic.*) AUTHOR
This manual page was written by Gustavo Franco <stratus@acm.org>, for the Debian project (but may be used for others). Oct 28th, 2007 SIMPLE-CDD(1)
All times are GMT -4. The time now is 12:04 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy