How do i use a config.txt to recursively pass a set of variables to a shell script
eg my config.txt looks like this :
path=c://dataset/set1
v1= a.bin
v2= b.bin
path=c://dataset/set2
v1= xy.bin
v2= abc.bin
..................
and so on .
and my testscript : (2 Replies)
I'm writing a shell script. I want to put the variables in a separate config files and use those inside my script.
e.g. the config file (temp.conf)will have the values like
mapping=123
file_name=xyz.txt
I want to access these variables in temp.conf(i.e. mapping and file_name) from inside the... (7 Replies)
I have a perl script that opens a text file containing numbers on each line:
for example:
755993
755994
755995
755996
755997
755998
The perl script takes these numbers and store them as an array @raw_data, where I can access individual numbers by using $raw_data for the value 755993.... (2 Replies)
Hi,
I basically have 2 shell scripts.
One is a shell script will get the variable value from the user. The variable is nothing but the IP of the remote system.
Another shell script is a script that does the job of connecting to the remote system using ssh. This uses a expect utility in turn.
... (2 Replies)
Hi,
I have a text file as follows:
a.txt
------
STEPS=3
STEP_DURATION=100
INTERVAL=60
I want to use these values in a shell script.
How to go about this? (3 Replies)
I have a shell script (.sh) and I want to pass a parameter value to the awk command but I am getting exception, please assist.
diff=$1$2.diff
id=$2 new=new_$diff
echo "My id is $1"
echo "I want to sync for user account $id"
##awk command I am using is as below
cat $diff | awk... (2 Replies)
Dear Unix gurus,
We have a config shell script file which has 30 variables which needs to be passed to master unix shell script that invokes oracle database sessions. So those 30 variables need to go through the database sessions (They are inputs) via a shell script. one of the variable name... (1 Reply)
I have the below script triggered daily at 330am in the morning, since last 7 days job not writing anything to database.
below impala shell calling shell file which has sql , it is extracting data and loads to a flat file txt file. which is going wrong for last 1 week.
need help, echo... (2 Replies)
Dear Friends,
Please help me on this
my script name is send.csh
In this i have written the statement like this
set args = ( city state country price )
I want to pass this array to another c shell called receiver.csh. and i want to use it in this c shell
or
how to pass to... (2 Replies)
I want to make a config file which contain all the paths.
i want to read the config file line by line and pass as an argument on my below function.
Replace all the path with reading config path line by line and pass in respective functions.
how can i achieve that?
Kindly guide.
... (6 Replies)
Discussion started by: sadique.manzar
6 Replies
LEARN ABOUT LINUX
shcomp
SHCOMP(1) User Environment Utilities SHCOMP(1)NAME
shcomp - compile a ksh93 shell script
SYNOPSIS
shcomp [ options ] [infile] [outfile]]
ORIGIN OF THIS MAN PAGE
This man page was written by Christophe Martin <Schplurtz@free.fr> for the Debian GNU/Linux system. It is based on "shcomp --man" output.
DESCRIPTION
Unless -D is specified, shcomp takes a shell script, infile, and creates a binary format file, outfile, that ksh93 can read and execute
with the same effect as the original script.
Since aliases are processed as the script is read, alias definitions whose value requires variable expansion will not work correctly.
If -D is specified, all double quoted strings that are preceded by $ are output. These are the messages that need to be translated to
locale specific versions for internationalization.
If outfile is omitted, then the results will be written to standard output. If infile is also omitted, the shell script will be read from
standard input.
OPTIONS -D, --dictionary
Generate a list of strings that need to be placed in a message catalog for internationalization.
-n, --noexec
Displays warning messages for obsolete or non-conforming constructs.
-v, --verbose
Displays input from infile onto standard error as it reads it.
--man Displays this man page on standard error and exits.
--help Shows a short help message and exits.
EXIT STATUS
0 Successful completion.
>0 An error occurred.
DEBIAN WARNING
On a Debian GNU/Linux system, more than one package may provide ksh. the output of shcomp can only be used by ksh93. Any other ksh will be
unable to run the compiled script.
EXAMPLE
( echo '#! /bin/ksh93' ; shcomp myscript ) > myscript.bin &&
chmod 755 myscript.bin
./myscript.bin
SEE ALSO ksh(1)IMPLEMENTATION
version shcomp (AT&T Labs Research) 2003-03-02
author David Korn <dgk@research.att.com>
copyright Copyright (c) 1982-2005 AT&T Corp.
license http://www.opensource.org/licenses/cpl1.0.txt
KSH93 Fri Jun 3 2005 SHCOMP(1)