Looping through records in db and processing them in UNIX


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Looping through records in db and processing them in UNIX
# 1  
Old 08-18-2016
You could also do this in the shell if you run the SQL and capture the output. You could do this with a file or a pipe to get it input a shell loop. It may be simpler to understand but may not run as efficiently as the all-in-one SQL solution suggested above.

Do you want to consider it?


Robin
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Text processing in UNIX

Greetings! I have a text file that I am trying to process to get the desired output but looks like I will need the community help. Input File: a|x|london|consumer|consumer1|country||D|consumer|consumer1|country||1 a|x|paris|consumer|consumer2|country||D|consumer1|consumer2|country||2... (3 Replies)
Discussion started by: bikerboy
3 Replies

2. Shell Programming and Scripting

Looping with wait in UNIX

Hello Gurus , Could you help me with my below requirement In my script I will start a process ,it takes some time to complete the process.After completion it will create a file after that I have to restart the process again The number of time it will be done will vary but that count we... (4 Replies)
Discussion started by: Pratik4891
4 Replies

3. Programming

Unix Shell background processing

So I made my own unix shell, but i want to make a background process when using the & appended to the end, so far most of the commands seem to work (except cd, but thats another story) right now here is what I have got. Im thinking maybe I shouldn't be using switch and maybe switch it to... (27 Replies)
Discussion started by: Mercfh
27 Replies

4. Solaris

Signal Processing in unix

I've read the man page of singal(3) but I still can't quite understand what is the difference between SIGINT, SIGALRM and SIGTERM. Can someone tell me what is the behavioral difference among these 3 signals in kill command? Thanks! (2 Replies)
Discussion started by: joe228
2 Replies

5. Infrastructure Monitoring

Processing records as group - awk

I have a file has following records policy glb id 1233 name Permit ping from "One" to "Second" "Address1" "Any" "ICMP-ANY" permit policy id 999251 service "snmp-udp" exit policy glb id 1234 name Permit telnet from "One" to "Second" "Address2" "Any" "TCP-ANY" permit policy id 1234... (3 Replies)
Discussion started by: baskar
3 Replies

6. Shell Programming and Scripting

How to use looping in unix

Can someone help me coding a loop (like for loop in C)? I mean what is the syntax....? My requirement is, i have to send every successive string searched using awk to a csv file till the end of the file..Please help. (1 Reply)
Discussion started by: goutam_igate
1 Replies

7. UNIX for Dummies Questions & Answers

processing records in a file

Hi, I have a file that contains some records that I would like to process each line that I am interested in. My goal is to create a new file that contains only the rest_of_line for each line that matches. It has the following File Format command, platform, rest_of_line" I am searching the... (2 Replies)
Discussion started by: CAGIRL
2 Replies

8. Shell Programming and Scripting

AWK Multi-Line Records Processing

I am an Awk newbie and cannot wrap my brain around my problem: Given multi-line records of varying lengths separated by a blank line I need to skip the first two lines of every record and extract every-other line in each record unless the first line of the record has the word "(CONT)" in the... (10 Replies)
Discussion started by: RacerX
10 Replies

9. Shell Programming and Scripting

how to achieve following parallel processing thru unix

hey...... i hav the follwing scripts needs to run parallel, so i made it as follows, $HPath/start_script.sh 20 & $HPath/start_script.sh 03 & $HPath/start_script.sh 01 & $HPath/start_script.sh 12 & then once all these above got completed successfully i have to run ... (3 Replies)
Discussion started by: manas_ranjan
3 Replies

10. UNIX for Dummies Questions & Answers

Help with Unix File Processing

Hi, Does anyone know of a Unix command that would give me the most recent file from a list of files with the same names except for the date/time stamp, i.e. kah_en_20070103T2234307Z.zip (with an actual date/time stamp of 1/3/07 4:41 pm), kah_en_20070104T054732Z.zip (with an actual date/time stamp... (6 Replies)
Discussion started by: tls77065
6 Replies
Login or Register to Ask a Question
PX_GET_RECORD2(3)					     Library Functions Manual						 PX_GET_RECORD2(3)

NAME
PX_get_record2 -- Returns record in Paradox file SYNOPSIS
#include <paradox.h> int PX_get_record2(pxdoc_t *pxdoc, int recno, char *data, int *deleted, pxdatablockinfo_t *pxdbinfo) DESCRIPTION
This function is similar to PX_get_record(3) but takes two extra parameters. If *deleted is set to 1 the function will consider any record in the database, even those which are deleted. If *pxdbinfo is not NULL, the function will return some information about the data block where the record has been read from. You will have to allocate memory for pxdbinfo before calling PX_get_record2. On return *deleted will be set to 1 if the requested record is deleted or 0 if it is not deleted. The struct pxdatablockinfo_t has the fol- lowing fields: blockpos (long) File positon where the block starts. The first six bytes of the block contain the header, followed by the record data. recordpos (long) File position where the requested record starts. size (int) Size of the data block without the six bytes for the header. recno (int) Record number within the data block. The first record in the block has number 0. numrecords (int) The number of records in this block. number (int) The number of the data block. This function may return records with invalid data, because records are not explizitly marked as deleted, but rather the size of a valid data block is modified. A data block is a fixed size area in the file which holds a certain number of records. If for some reason a data block has newer been completely filled with records, the algorithmn anticipates deleted records in this data block, which are not there. This often happens with the last data block in a file, which is likely to not being fully filled with records. If you accessing several records, do it in ascending order, because this is the most efficient way. Note: This function is deprecated. Use PX_retrieve_record(3) instead RETURN VALUE
Returns 0 on success and -1 on failure. SEE ALSO
PX_get_field(3), PX_get_record(3) AUTHOR
This manual page was written by Uwe Steinmann uwe@steinmann.cx. PX_GET_RECORD2(3)