09-04-2009
Getting the value from a parameter file
Hi
I am nebie to Unix
I have a prameter file which has semicolon seperated values which has the field
STATUS_CODE;9000;1;1200;2000
The values are dynamic ie. it can be 1,2,3...any number
How do i get all the values of this parameter into a variable
Please if anyone can help me out on this...
Thanks in advance
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Say I write something like the following:
var1=1
var2=2
for int in 1 2
do
echo "\$var$int"
done
I want the output to be:
1
2
Instead I get something like:
$var1
$var2 (2 Replies)
Discussion started by: Awanka
2 Replies
2. Shell Programming and Scripting
Hi,
I need to read the parameters from a file and assign them to Global variables. I need to read a specific parameter value every time and pass it to the other script.
Suppose i have a parameter file like PARAM.txt
PAR1= VAL1
PAR2= VAL2
PAR3= VAL3
I want to read PAR2 file and in the... (1 Reply)
Discussion started by: Raamc
1 Replies
3. UNIX for Dummies Questions & Answers
hi
I have a shell script say primary.sh . There is a file called params
my scenario is
primary.sh should read all the values and echo it
for example
i should pass like
$primary.sh params
output would be
Abc
... (2 Replies)
Discussion started by: ssuresh1999
2 Replies
4. Shell Programming and Scripting
Hi
I am looking for a unix command or a small shell script which can takes one parameter and then searches for the passed in the parameter in any or all files under say /home/dev/
Can anyone please help me on this? (3 Replies)
Discussion started by: pankaj80
3 Replies
5. Shell Programming and Scripting
i am passing input parameter 'one_two' to the script , the script output should display the result as below
one_1two
one_2two
one_3two
if
then
echo " Usage : <$0> <DATABASE> "
exit 0
else
for DB in 1 2 3
do
DBname=`$DATABASE | awk -F "_" '{print $1_${DB}_$2}`
done
fi (5 Replies)
Discussion started by: only4satish
5 Replies
6. Shell Programming and Scripting
hi all,
i have a parameter file of following format, i want a method which can get the value of specific parameter.
parameter file format:
<Parameter Name="FileLocationWindows">
<Description>
The directory location of the logger file.
... (1 Reply)
Discussion started by: laxmikant.hcl
1 Replies
7. Shell Programming and Scripting
Hi,
I have the following files.
->cat scr.sh
export TMP_DIR=/home/user/folder1
export TMP_DIR_2=/home/user/folder2
while read line
do
cat "$line"
done<file_list.dat
------------------------
-> cat file_list.dat
$TMP_DIR/file1.txt
$TMP_DIR_2/file2.txt
---------------------------
-> cat... (6 Replies)
Discussion started by: barath
6 Replies
8. Shell Programming and Scripting
Hi ,
I am passing date parameter through file
my shell script testing.sh is
#set -x
#set -v
asd=$1
asd1=$2
echo $asd
echo $asd1
Passing parameter as below
sh testing.sh `cat file1.txt`
Output (2 Replies)
Discussion started by: kaushik02018
2 Replies
9. Shell Programming and Scripting
Hi.
How do I achieve this
sh /EDWH-DMT02/script/MISC/exec_sql.sh "@/EDWH-DMT02/script/others/CSM_CKC/Complete_List.sql ${file_name}" Complete_List.txt
The /EDWH-DMT02/script/MISC/exec_sql.sh has two parameters and it's working fine with this
sh /EDWH-DMT02/script/MISC/exec_sql.sh... (7 Replies)
Discussion started by: aimy
7 Replies
10. Shell Programming and Scripting
Hi Team,
In our project we have written below 2 scripts like
Script1:
Shell script start & END
Begin Audit process - uses teradata bteq
END Audit Process
Script 2: Environemtal variable file different
Now Client ask to change this requirement and need below files:
Script1:... (1 Reply)
Discussion started by: tusharzaware1
1 Replies
dial(3C) dial(3C)
NAME
dial(), undial() - establish an outgoing terminal line connection
SYNOPSIS
DESCRIPTION
The function returns a file descriptor for a terminal line open for read/write. The argument to is a structure (defined in the header
file).
When finished with the terminal line, the calling program must invoke to release the semaphore that has been set during the allocation of
the terminal device.
The definition of in the header file is:
elements are as follows:
speed Intended only for use with an outgoing dialed call, in which case its value should be either 300 or 1200 to identify the
113A modem, or the high- or low-speed setting on the 212A modem. Note that the 113A modem or the low-speed setting of the
212A modem transmits at any rate between 0 and 300 bits per second. However, the high-speed setting of the 212A modem
transmits and receives at 1200 bits per second only.
baud Desired transmission baud rate. For example, one might set baud to 110 and speed to 300 (or 1200). However, if speed is
set to 1200, baud must be set to high(1200).
line If the desired terminal line is a direct line, a string pointer to its device name should be placed in the line element in
the structure. Legal values for such terminal device names are kept in the file. In this case, the value of the baud
element need not be specified as it will be determined from the file.
telno A pointer to a character string representing the telephone number to be dialed. Such numbers can consist only of symbols
described below. The termination symbol is supplied by the function, and should not be included in the telno string
passed to in the structure.
Permissible Codes
Dial
Dial
Dial
4-second delay for second dial tone
End of number
Wait for secondary dial tone
Flash off-hook for 1 second
modem Specifies modem control for direct lines. Set to non-zero if modem control is required.
attr Pointer to a structure, as defined in the header file. A NULL value for this pointer element can be passed to the func-
tion, but if such a structure is included, the elements specified in it are set for the outgoing terminal line before the
connection is established. This is often important for certain attributes such as parity and baud rate.
device Holds the device name that establishes the connection.
dev_len Length of the device name that is copied into the array device.
RETURN VALUE
On failure, a negative value indicating the reason for the failure is returned. Mnemonics for these negative indices as listed here are
defined in the header file.
WARNINGS
Including the header file automatically includes the header file.
The above routine uses which causes unexpected increases in the size of programs that otherwise do not use standard I/O.
The function will modify the values of some of the fields of the structure so if is reinvoked, it will reinitialize the values of the
structure.
FILES
SEE ALSO
uucp(1), alarm(2), read(2), write(2), thread_safety(5), termio(7).
UUCP tutorial in
dial(3C)