11-22-2011
Quote:
Originally Posted by
smilesavvy
Please help me to understand with some examples of input files or anything??
here the input file (
$1.txt)contents are like:
0030063224
0030063278
0030063234
The select command takes each record from the above file and run the query and redirects the output to output.txt file.
The query output is redirected to file:
output.txt
its contents are like
203969 OrdAcctCycChg DAEMON1
203456 OrdAcctCycChg DAEMON1
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am getting a variable as x=2006/01/18
now I have to extract each field from it.
Like x1=2006, x2=01 and x3=18.
Any idea how?
Thanks a lot for help.
Thanks
CSaha (6 Replies)
Discussion started by: csaha
6 Replies
2. UNIX for Dummies Questions & Answers
Dear friends,
I'm a novice Unix user and I'm trying to learn the ropes. I have a big task I have to accomplish and I'm convinced Unix can get the job done, I just haven't figured out how. I recently posted on the topic of cutting text between unique text patterns and somebody helped me a great... (24 Replies)
Discussion started by: spindoctor
24 Replies
3. Shell Programming and Scripting
Hi,
i have a line with several fields (indefinite number of - count varies) separated by colon.
Now, i need to pick each field (except the first one) and have it assigned to variable within a loop. In other words, in the first iteration of the loop, the variable must be assigned with 2nd... (2 Replies)
Discussion started by: prvnrk
2 Replies
4. Shell Programming and Scripting
Greetings,
I would like to extract records from a fixed width text file that have unique field elements.
Data is structured like this:
John A Smith NY
Mary C Jones WA
Adam J Clark PA
Mary Jones WA
Fieldname / start-end position
Firstname 1-10... (8 Replies)
Discussion started by: sitney
8 Replies
5. Shell Programming and Scripting
I need some assistance, I am writing a script in bash.
I want to do two things:
1/. I want to replace the LF at the end of the RFH Ø ¸MQSTR ¸ so I can process the file record by record using a while loop.
2/. I want to extract two fields from each record, they are identified with... (1 Reply)
Discussion started by: gugs
1 Replies
6. Shell Programming and Scripting
I am need to extract a number of values from a file, put have now clue how to do this.
The file looks like this:
# My file
Dest=87;CompatibleSystemSoftwareVersion=2.5300-;
Dest=87;ImageVersion=000061f3;SystemSoftwareVersion=2.5300;CDN=http://my.backup.com/download.txt;CDN_Timeout=30;
I... (3 Replies)
Discussion started by: MagicDude4Eva
3 Replies
7. Shell Programming and Scripting
Hi,
I have multiple files in a directory all I am trying to do is to read the files in the directory and extract data from 2nd field till 10th field and put it in a new files. The files are pipe delimited. The new file will have the same name as the old file but the prefix of PRE_oldfilename.
... (1 Reply)
Discussion started by: simi28
1 Replies
8. Shell Programming and Scripting
Hi,
I need to extract last character of the field retrieved from the database using select command.
eg:
select event,text from event_data;
o/p: Event1,text1
But I need to extract only '1' from the fields...similarly '2' from Event2,text2 and '3' from Event3,text3 etc., and need to pass... (6 Replies)
Discussion started by: Rajesh Putnala
6 Replies
9. Shell Programming and Scripting
I have one file A.txt which is comma separated and I want to extract first 4 field's in a file and also I want to add one more column in output
A.txt in output for all records. A.txt should not be hard coded since I do not filename it may be any file. (1 Reply)
Discussion started by: vamsi.valiveti
1 Replies
10. UNIX for Beginners Questions & Answers
Hello All,
I have a requirement to split the input.xml file different files and i have tried using earlier examples(where i have posted in the forum), but still no luck
Here is my input.xml
<jms-system-resource>
<name>UMSJMSSystemResource</name>
... (4 Replies)
Discussion started by: Siv51427882
4 Replies
LEARN ABOUT CENTOS
papi_set_thr_specific
PAPI_set_thr_specific(3) PAPI PAPI_set_thr_specific(3)
NAME
PAPI_set_thr_specific -
Store a pointer to a thread specific data structure.
SYNOPSIS
Detailed Description
@par Prototype:
int PAPI_set_thr_specific( int tag, void *ptr );
@param tag
An identifier, the value of which is either PAPI_USR1_TLS or
PAPI_USR2_TLS. This identifier indicates which of several data
structures associated with this thread is to be accessed.
@param ptr
A pointer to the memory containing the data structure.
@retval PAPI_OK
@retval PAPI_EINVAL
The @em tag argument is out of range.
In C, PAPI_set_thr_specific will save @em ptr into an array indexed by @em tag.
There are 2 user available locations and @em tag can be either
PAPI_USR1_TLS or PAPI_USR2_TLS.
The array mentioned above is managed by PAPI and allocated to each
thread which has called PAPI_thread_init.
There is no Fortran equivalent function.
@par Example:
int ret;
HighLevelInfo *state = NULL;
ret = PAPI_thread_init(pthread_self);
if (ret != PAPI_OK) handle_error(ret);
// Do we have the thread specific data setup yet?
ret = PAPI_get_thr_specific(PAPI_USR1_TLS, (void *) &state);
if (ret != PAPI_OK || state == NULL) {
state = (HighLevelInfo *) malloc(sizeof(HighLevelInfo));
if (state == NULL) return (PAPI_ESYS);
memset(state, 0, sizeof(HighLevelInfo));
state->EventSet = PAPI_NULL;
ret = PAPI_create_eventset(&state->EventSet);
if (ret != PAPI_OK) return (PAPI_ESYS);
ret = PAPI_set_thr_specific(PAPI_USR1_TLS, state);
if (ret != PAPI_OK) return (ret);
}
*
See Also:
PAPI_register_thread PAPI_thread_init PAPI_thread_id PAPI_get_thr_specific
Author
Generated automatically by Doxygen for PAPI from the source code.
Version 5.2.0.0 Tue Jun 17 2014 PAPI_set_thr_specific(3)