The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
text processing ( sed/awk) anchal_khare Shell Programming and Scripting 12 02-29-2008 08:44 AM
String Processing bthomas UNIX for Dummies Questions & Answers 1 02-19-2008 11:13 AM
Simple Event Processing != Complex Event Processing iBot Complex Event Processing RSS News 0 12-16-2007 12:10 PM
Processing a CSV file janemary.a High Level Programming 1 05-11-2007 06:27 AM
data processing rochitsharma UNIX for Advanced & Expert Users 5 06-14-2006 04:13 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-26-2007
nagrcm nagrcm is offline
Registered User
  
 

Join Date: Jul 2007
Posts: 2
Post Parllel Processing

In simple words of the scenario.

I have some set of files that are to loaded into a table in parallel

Loading part would be taken care of the Abintio graph. I must develop a script which instructs this graph about how to process the files like wat files to process and how to process by passing on some parameters.

This is the task...

let me explain u much better with an example.

Let have that i have the following files EMP.dat, DEPT.dat, BONUS.dat

I have splited all these files into two. EMP001.dat, EMP002.dat, DEPT001.dat, DEPT002.dat, BONUS001.dat, BONUS002.dat

Now take TO Parameters $Load_batch and $set_time

IF $load_batch ='N' the script should provide the information of the files to be processed (which are EMP.dat, DEPT.dat, BONUS.dat)

IF $load_batch = "y" The script should provide the information of batches (first batch files EMP001.dat, DEPT001.dat, BONUS001.dat; Second Batch EMP002.dat, DEPT002.dat, BONUS002.dat)

$set_time is a parameter defines the time between these batches...

Any ideas on this.

?
  #2 (permalink)  
Old 07-30-2007
srikanthus2002's Avatar
srikanthus2002 srikanthus2002 is offline
Registered User
  
 

Join Date: Sep 2006
Location: Can u guess...!
Posts: 160
#!/bin/sh
CURDIR=/home/user/folder

ls -1 *.dat > $CURDIR/dat_fiels
for i in `cat $CURDIR/dat_fiels`
do
echo $i | cut -d"." -f1 | grep "[0-9]" 1> /dev/null
if [ $? -eq 0 ]
then
echo "splitted file $i"
else
echo "normat file $i"
fi
done


o/p will be :

normat file BONUS.dat
splitted file DEPT001.dat
splitted file DEPT002.dat
splitted file DEPT003.dat
normat file DEPT.dat
splitted file EMP001.dat
splitted file EMP002.dat
splitted file EMP003.dat
normat file EMP.dat
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 12:23 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0