Sponsored Content
Full Discussion: Make process parallel
Top Forums Shell Programming and Scripting Make process parallel Post 302943467 by wahi80 on Friday 8th of May 2015 05:04:51 PM
Old 05-08-2015
Make process parallel

Hi,

I have a file which has a list of 200 tables e.g: table.txt
I need to do a count for each table and store it in a file.

So I did something like this:

Code:
for TABLE in `cat table.txt`
do
T_CNT=$(sqlplus -s -l / as sysdba <<EOF
set echo off heading off feadback off
SELECT count(*)
FROM ${TABLE};
exit;
EOF)

echo "$T_CNT|$TABLE >> $AUDIT_FILE
done

The above script does the job, but it goes through each table one at a time.
Is there a way to make this process more parallel, so that I can query multiple tables at a time?

I was thinking of doing a split. Something like
Code:
split -l 20 table.txt

The above line would create 10 splits, so I could query 10 tables at a time.

But I'm not sure what my next step is so that 10 Select clauses are issued at smae time.

Please advise.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

killing parallel oracle process

Hi guys: I have a an oracle job which uses 10 parallel hints and would like to killit when it hangs. I want to kill all the processes that have been spawned. what I do right now is get the pid of the scheduler process which initiated theis job and the do a ps -ef| grep 'pid' and trace through... (1 Reply)
Discussion started by: oracle8
1 Replies

2. Shell Programming and Scripting

split process files in parallel and rejoin

Hi I need to split a huge file into multiple smaller files using split command. After that i need to process each file in the back ground with sql loader .Sql loader is a utlity to load CSV files into oracle . Check the status of each of these sqlloaders and then after sucessfull... (6 Replies)
Discussion started by: xiamin
6 Replies

3. AIX

Make : parallel execution

Hi, Is there any way to run parallel jobs using make command? I am using non-GNU make utility on AIX 4.3. I want to run 2 jobs symultaneously using make utility. Thanks. Suman (0 Replies)
Discussion started by: suman_jakkula
0 Replies

4. Shell Programming and Scripting

how to start a process and make it sleep for 5 mins and then kill that process

how to start a process and make it sleep for 5 mins and then kill that process (6 Replies)
Discussion started by: shrao
6 Replies

5. Shell Programming and Scripting

How to make the parent process to wait for the child process

Hi All, I have two ksh script. 1st script calls the 2nd script and the second script calls an 'C' program. I want 1st script to wait until the 'C' program completes. I cant able to get the process id for the 'C' program (child process) to make the 1st script to wait for the second... (7 Replies)
Discussion started by: sennidurai
7 Replies

6. Shell Programming and Scripting

Parallel process in Perl

HI All, I have scenerio where I need to call sub modules through for loop for (i=0; i<8000 ;i++) { .. BLOCKA } BLOCKA { .. .. subroutine 1; subroutine 2; } I want this to be run in parallel process1 BLOCKA { (6 Replies)
Discussion started by: gvk25
6 Replies

7. Programming

Parallel process in java

Hello; Please Are both threads execute in parallel? Thank you (4 Replies)
Discussion started by: chercheur857
4 Replies

8. UNIX for Dummies Questions & Answers

Running parallel process

i am having 4 process,have to run parallel and not after one by one. sample1.sh sample2.sh sample3.sh sample4.sh Thanks in advance. i (11 Replies)
Discussion started by: sagar_1986
11 Replies

9. Shell Programming and Scripting

How to make parallel execution on folder ?

I have few very huge files ~ 2 Billion rows of 130 column(CDR data) in a folder, I have written shell script need to read on each file in a folder and will create a new files based on some logic. But problem is it's taking time to create a new file due to the size , So i dont want to corrupt... (6 Replies)
Discussion started by: rspwilliam
6 Replies

10. Shell Programming and Scripting

Monitoring processes in parallel and process log file after process exits

I am writing a script to kick off a process to gather logs on multiple nodes in parallel using "&". These processes create individual log files. Which I would like to filter and convert in CSV format after they are complete. I am facing following issues: 1. Monitor all Processes parallelly.... (5 Replies)
Discussion started by: shunya
5 Replies
IBUS-TABLE-CREATEDB(1)													    IBUS-TABLE-CREATEDB(1)

NAME
ibus-table-createdb - create ibus-table database from table source SYNOPSIS
ibus-table-createdb [ [ -n name ] [ --name name ] ] [ [ -s source ] [ --source source ] ] [ [ -e extra ] [ --extra extra ] ] [ [ -p pinyin ] [ --pinyin pinyin ] ] [ -o ] [ --no-create-index ] [ -i ] [ --create-index-only ] [ -d ] [ --debug ] DESCRIPTION
ibus-table-createdb creates a database for ibus-table from a source table. OPTIONS
This program follows the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. -n database-file specifies the file name for the binary database for the IME. The default is ''. If the file name of the database is not specified, the file name of the source file before the first '.' will be appended with '.db' and that will be used as the file name of the database. -s source-file specifies the file which contains the source of the IME. The default is ''. -e extra-words-file specifies the file name for the extra words for the IME. The default is ''. -p pinyin-file specifies the source file for the pinyin. The default is '/usr/share/ibus-table/data/pinyin_table.txt.bz2'. -o Do not create an index for a database (Only for distribution purposes, a normal user should not use this flag!) -i Only create an index for an existing database. Specifying the file name of the binary database with the -n or --name option is required when this option is used. -d Print extra debug messages. EXAMPLES
ibus-table-createdb -n ipa-x-sampa.db -s ipa-x-sampa.txt Create the binary database ``ipa-x-sampa.db'' from the source file ``ipa-x-sampa.txt''. ibus-table-createdb -i -n ipa-x-sampa.db Create an index for the database ``ipa-x-sampa.db''. AUTHOR
This manual page was written by Mike FABIAN <mfabian@redhat.com>. Apr 18, 2013 IBUS-TABLE-CREATEDB(1)
All times are GMT -4. The time now is 03:46 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy