02-15-2013
Search and store value from .csv
Dear All,
I am using the command to find the value from path
DYMV_STD_NAME=$( echo $file | sed 's#.*/[^_][^_]*_\([^_][^_]*\).*#\1#' )
file = RRK11234_RKY5807_SRY000_HOME_20071010.zip
It give me value DYMV_STD_NAME = RKY5807
Now i have flat as below
The contect of the file would be as below.
Home_TITLE,People_TITLE,Repo_ALIAS
HMN5530,RKY5807,/mine_repo/rike001
HMN5530,SRY6443,/mine_repo/rike001
HMN5530,ARDY001,/mine_repo/rike001
I want to store only respective value in variable For value RKY5807
in one one variable i want to store HMN5530 and in another variable /mine_repo/rike001
Please somebody can provide the code for this.
10 More Discussions You Might Find Interesting
1. UNIX and Linux Applications
Hi
I'm using an oracle database... Lets call it databasename
My username and password are the same .... lets all that andrea/andrea
So I want to write a script to copy all the data from my table called tablename and store that data to a csv file called filename.
I cant seem to get... (2 Replies)
Discussion started by: ladyAnne
2 Replies
2. UNIX for Dummies Questions & Answers
I have looked at other posts on this and cannot get what I need,
I have a csv file (UTF -8) that has corrupt data in:
"p.fażżżż","ażżża","","","",""
The hex value for the upside down ? is a C2BF
How can I search a csv file for this hex value C2BF
Any help would be appreciated
... (2 Replies)
Discussion started by: Pablo_beezo
2 Replies
3. Shell Programming and Scripting
I need to write a script to store the contents of a table in a csv file
I'm using Toad, it's a Oracle database. (5 Replies)
Discussion started by: ladyAnne
5 Replies
4. Shell Programming and Scripting
Hi,
I have a sybase stored procedure which takes two input parameters (start_date and end_date) and when it get executed, it gives few records as an output.
I want to write a unix script (ksh) which login to the sybase database, then execute this stored procedure (takes the input parameter as... (8 Replies)
Discussion started by: amit.mathur08
8 Replies
5. Shell Programming and Scripting
Hi,
I'm trying to search a text file for a string: "energy(sigma->0)=". To do so, I executed the grep command, which returned many matches, for example:
energy without entropy = -112.16486170 energy(sigma->0) = -112.16520778
energy without entropy = -112.16488936 ... (5 Replies)
Discussion started by: gwr
5 Replies
6. Shell Programming and Scripting
hello
i have two files
temp.txt
and temp_unique.text
the second file consists the unique fields from the temp.txt file
the strings stored are in the following form
4,4
17,12
15,65
4,4
14,41
15,65
65,89
1254,1298i'm able to run the following script to get the total count of a... (3 Replies)
Discussion started by: vaibhavkorde
3 Replies
7. Shell Programming and Scripting
Hi
I have two csv files, with the following formats:
FileA.log:
Application, This occured blah
Application, That occured blah
Application, Also this
AnotherLog, Bob did this
AnotherLog, Dave did that
FileB.log:
Uk, London, Application, datetime, LaterDateTime, Today it had'nt... (8 Replies)
Discussion started by: PerlNewbRP
8 Replies
8. Shell Programming and Scripting
hi, someone to know how can i read a specific column of csv file and search the value in other csv columns if exist the value in the second csv copy entire row with all field in a new csv file. i suppose that its possible using awk but i m not expertise thanks in advance (8 Replies)
Discussion started by: giankan
8 Replies
9. Shell Programming and Scripting
I want to write a unix shellScript should store the csv files. into a paticular folder (2 Replies)
Discussion started by: RaghavendraT
2 Replies
10. Shell Programming and Scripting
Hi guys,
I have a text file named file1.txt that is formatted like this:
001 , ID , 20000
002 , Name , Brandon
003 , Phone_Number , 616-234-1999
004 , SSNumber , 234-23-234
005 , Model , Toyota
007 , Engine ,V8
008 , GPS , OFF
and I have file2.txt formatted like this:
... (2 Replies)
Discussion started by: An0mander
2 Replies
LEARN ABOUT OPENSOLARIS
atomic_ops
atomic_ops(9F) Kernel Functions for Drivers atomic_ops(9F)
NAME
atomic_ops - atomic operations
SYNOPSIS
#include <sys/atomic.h>
DESCRIPTION
This collection of functions provides atomic memory operations. There are 8 different classes of atomic operations:
atomic_add(9F) These functions provide an atomic addition of a signed value to a variable.
atomic_and(9F) These functions provide an atomic logical 'and' of a value to a variable.
atomic_bits(9F) These functions provide atomic bit setting and clearing within a variable.
atomic_cas(9F) These functions provide an atomic comparison of a value with a variable. If the comparison is equal, then swap in a new
value for the variable, returning the old value of the variable in either case.
atomic_dec(9F) These functions provide an atomic decrement on a variable.
atomic_inc(9F) These functions provide an atomic increment on a variable.
atomic_or(9F) These functions provide an atomic logical 'or' of a value to a variable.
atomic_swap(9F) These functions provide an atomic swap of a value with a variable, returning the old value of the variable.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Committed |
+-----------------------------+-----------------------------+
SEE ALSO
atomic_add(9F), atomic_and(9F), atomic_bits(9F), atomic_cas(9F), atomic_dec(9F), atomic_inc(9F), atomic_or(9F), atomic_swap(9F), mem-
bar_ops(9F), attributes(5)
NOTES
Atomic instructions ensure global visibility of atomically-modified variables on completion. In a relaxed store order system, this does
not guarantee that the visibility of other variables will be synchronized with the completion of the atomic instruction. If such synchro-
nization is required, memory barrier instructions must be used. See membar_ops(9F).
Atomic instructions can be expensive. since they require synchronization to occur at a hardware level. This means they should be used with
care to ensure that forcing hardware level synchronization occurs a minimum number of times. For example, if you have several variables
that need to be incremented as a group, and each needs to be done atomically, then do so with a mutex lock protecting all of them being
incremented rather than using the atomic_inc(9F) operation on each of them.
SunOS 5.11 28 Mar 2005 atomic_ops(9F)