cancel
Showing results for 
Search instead for 
Did you mean: 

handling huge files

Former Member
0 Kudos

I have a file structure like Header-Transaction Records(100K)-Trailer with Transaction Records of 100k.

I want to process the this file through file-xi-file scenario.

If I got to write a operating sytstem command/script to split the file in chunks , how to write it for the file structure that i am talking abt above ??

Regards

kumar

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

closing the thread

Former Member
0 Kudos

Hi Palnati

Check my reply to this thread

You can try using this Unix bash script

:
# Input: lines containing thre fields separated by white spaces

TAR_DIR=/tmp/data # The path name of the target directory

# Create the target directory if necessary
[ -d $TAR_DIR ] || mkdir $TAR_DIR

# Clear the contents of the target directory
rm -rf $TAR_DIR/*

# Do it
while read N E1 E2; do
echo $N>>$TAR_DIR/$E1$E2 # Create or append
done <<!
condition1
condition2
!

make changes as per your need

Thanks

Gaurav