10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi,
I have received a file which is 20 GB. We would like to split the file into 4 equal parts and process it to avoid memory issues.
If the record delimiter is unix new line, I could use split command either with option l or b.
The problem is that the line terminator is |##|
How to use... (5 Replies)
Discussion started by: Ravi.K
5 Replies
2. Shell Programming and Scripting
I was wondering if anyone could explain to me how to split a variable length EBCDIC file into seperate files based on the record key. I have the COBOL layout, and so I need to split the file into 13 different EBCDIC files so that I can run each one through a C++ converter I have, and get the... (11 Replies)
Discussion started by: hanshot1stx
11 Replies
3. Shell Programming and Scripting
Hello All,
I have a large file, more than 50,000 lines, and I want to split it in even 5000 records. Which I can do using
sed '1d;$d;' <filename> | awk 'NR%5000==1{x="F"++i;}{print > x}'Now I need to add one more condition that is not to break the file at 5000th record if the 5000th record... (20 Replies)
Discussion started by: ibmtech
20 Replies
4. Shell Programming and Scripting
Hi All,
Need help in writing a shell script for the below requirement:
i/p: 123456789
o/p:
123
456
789
Req: one record should be split into multiple based on the length ( after every third character it should be moved into next line)
Thanks in Advance (14 Replies)
Discussion started by: HemaV
14 Replies
5. Shell Programming and Scripting
Hi,
Help required to split record value and write to new row.
Input
a~b~c~value in ('3','4','5')~test
output
a~b~c~3~test
a~b~c~4~test
a~b~c~5~test
input
a~b~c~value in ('3','4')~test
output
a~b~c~3~test
a~b~c~4~test (8 Replies)
Discussion started by: Jairaj
8 Replies
6. UNIX for Dummies Questions & Answers
Hi ,
I have file with all records in one line, which needs to split it to have a fixed length.Am trying to execute the below script for the same
FILENAME="$1"
while line LINE
do
echo $LINE | awk 'BEGIN{n=1}{while(substr($0,n,10)){print substr($0,n,10);n+=10}}'
done < $FILENAME
it... (4 Replies)
Discussion started by: nishantrk
4 Replies
7. Shell Programming and Scripting
I want to keep only records contain length is 10 other records should remove from my original file without redirecting to other output file.
Source
1234567890
123456789011234
abcdefghil
Expected Result
1234567890
abcdefghil (9 Replies)
Discussion started by: Jairaj
9 Replies
8. Shell Programming and Scripting
Hi ,
I have a requirement to split the record based on particular match using UNIX.
Case1:
Input Record :
10.44.48.63;"Personals/Dating;sports";1441
Output Records :
10.44.48.63;Personals/Dating;1441;Original
10.44.48.63;sports;1441;Dummy
Case2:
Input Record : ... (5 Replies)
Discussion started by: mksuneel
5 Replies
9. Shell Programming and Scripting
Hi
I receive a mainframe file which has very long records (1100 chars) with no field delimiters. I need to parse each record and output a comma delimited (csv) file. The record layout is fixed. If there weren't so many fields and records I would read the file into Excel, as a "fixed width"... (10 Replies)
Discussion started by: wvdeijk
10 Replies
10. Shell Programming and Scripting
UNIX Scripting
Hi I am trying to read a record and split it into multiple records
My Record looks like this
1001A0010@B0010*&^0)C0012hgdj&6sD0020fhfri93kivmepi9
where
UniqueID is 1001
segments are A,B,C,D
length of each segment is 4 characters after the segment 0010 for A
0010 for B 0012... (5 Replies)
Discussion started by: pukars4u
5 Replies