05-17-2008
retrieve value from a file
hi
i have a cfg file,it contains
lpdma520.dev.ipc.us.aexp.com=SUBMCORE.REQUEST.FT
lpdma521.dev.ipc.us.aexp.com=SUBMCORE.REQUEST.FTREQ
lpdma522.dev.ipc.us.aexp.com=SUBMITSECUREFILEFLOW
i am retrieving the values using the function
RetrieveCfgvalue()
{
CFG_VALUE=`grep "$2=" $CONFIG_FILE_NAME | cut -d"=" -f2
eval "$1=$CFG_VALUE"
}
CONFIG_FILE_NAME="queuedetails.properties"
RetrieveCfgvalue lpdma520.dev.ipc.us.aexp.com lpdma520.dev.ipc.us.aexp.com
i am getting an error "line 1: lpdma522.dev.ipc.us.aexp.com=ESBUSCLT01,SUBMITSECUREFILEFLOW.SUBMCORE.REQUEST.FT,SUBMITSECUREFILEFLO W.NU.REQUEST.FT: command not found"
please help
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi All,
I am involved in a Datawarehousing project where my data files(ASCII text) are loaded on a Unix directory. When I do a Ls -l in Unix prompt i get a file listing along with the timestamp when these files were created/put on the server. I need to retrieve the timestamp associated with each... (2 Replies)
Discussion started by: 2nilotpal
2 Replies
2. Shell Programming and Scripting
Hey all, I have this file which contains a lot of messages in format like
This is my message!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Check This!
This is my second message!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!
... (5 Replies)
Discussion started by: mpang_
5 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I want to retrieve a particular line from a file and print its content to a file. Can you suggest how to do it in UNIX ?.
Rgds
vinayap (2 Replies)
Discussion started by: vinayap
2 Replies
4. UNIX for Dummies Questions & Answers
hi,
how to retrieve a particular character from a file? (1 Reply)
Discussion started by: singalla
1 Replies
5. Shell Programming and Scripting
I have a file name stored in a variable.
A=/bb/data/f233pdb
How can I retrive the base name (f233pdb) and the path (/bb/data/) and assign them to two new variables, so the result will look like this
B=f233pdb
C=/bb/data/
Thansk a lot for any help -A (8 Replies)
Discussion started by: aoussenko
8 Replies
6. UNIX for Advanced & Expert Users
How will retrieve for a particular months file in UNIX say for example from January to February 2008. (1 Reply)
Discussion started by: rajesh08
1 Replies
7. Shell Programming and Scripting
hi, I have write a code to retrive data from each line of a file:
sed -e '/^#/d' file.csv | awk '{ printf "TEST,%s:AUX,%s;\n", $0, "'A'"}' >
pippo.txt
where the input file.csv was like this:
1234
2345
2334
3344
and the output of my code is a file with:
TEST,1234:AUX,A;... (7 Replies)
Discussion started by: fafo77
7 Replies
8. Solaris
hi there,
Is there any way to retrive the deleted files from solaris,
we are using solaris 10 and the file seems delete when it is opened.
I search over by Google but no good result...
tnx :-) (4 Replies)
Discussion started by: dagigg
4 Replies
9. UNIX for Dummies Questions & Answers
Hi Guys,
How to retrieve/get *.sql file names which we refer in all *.sh files.
Can any one help me on this.
Thanks,
Kolipaka (3 Replies)
Discussion started by: lakshmanrk811
3 Replies
10. UNIX for Beginners Questions & Answers
I am having trouble matching *two* strings from one file anywhere in a line of a second file, and could use some help getting this figured out. My preference would be to use grep for this because I would like to take advantage of its -A option. The latter is due to the fact that I would like both... (2 Replies)
Discussion started by: jvoot
2 Replies
ipc.h(3HEAD) Headers ipc.h(3HEAD)
NAME
ipc.h, ipc - XSI interprocess communication access structure
SYNOPSIS
#include <sys/ipc.h>
DESCRIPTION
The <sys/ipc.h> header is used by three mechanisms for interprocess communication (IPC): messages, semaphores, and shared memory. All use a
common structure type, ipc_perm, to pass information used in determining permission to perform an IPC operation.
The ipc_perm structure contains the following members:
uid_t uid /* owner's user ID */
gid_t gid /* owner's group ID */
uid_t cuid /* creator's user ID */
gid_t cgid /* creator's group ID */
mode_t mode /* read/write permission
The uid_t, gid_t, mode_t, and key_t types are defined as described in <sys/types.h>. See types.h(3HEAD).
Definitions are provided for the constants listed below.
Mode bits:
IPC_CREAT Create entry if key does not exist.
IPC_EXCL Fail if key exists.
IPC_NOWAIT Error if request must wait.
Keys:
IPC_PRIVATE Private key.
Control commands:
IPC_RMID Remove identifier.
IPC_SET Set options.
IPC_STAT Get options.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
SEE ALSO
ftok(3C), types.h(3HEAD), attributes(5), standards(5)
SunOS 5.10 10 Sep 2004 ipc.h(3HEAD)