How to extract unique values within columns
up vote
1
down vote
favorite
I have a data file with 10,000 columns and 117,000 rows. my original data has a lot of repetition within each columns. it is like:
inputfile.txt :
123 124 111
321 124 111
123 000 111
123 111 222
I want to keep one copy of each value within each column like:
123 124 111
321 000 222
111
I need a program to do all columns together since I have 10,000 columns.
text-processing columns
|
show 9 more comments
up vote
1
down vote
favorite
I have a data file with 10,000 columns and 117,000 rows. my original data has a lot of repetition within each columns. it is like:
inputfile.txt :
123 124 111
321 124 111
123 000 111
123 111 222
I want to keep one copy of each value within each column like:
123 124 111
321 000 222
111
I need a program to do all columns together since I have 10,000 columns.
text-processing columns
I am confused by your sample command and the input & output files. That command on that input file does not produce the given output. Can you explain how you translate the given input to the given output, or does the sample command do what you want to do (just stopping short of all 10,000 columns) ?
– Jeff Schaller
Sep 9 '15 at 0:39
If the given command does what you want, then the answer may be as simple as:sort input.txt | uniq > output.txt
assuming you don't care if the input is re-ordered; there are ways around that requirement, if needed.
– Jeff Schaller
Sep 9 '15 at 0:40
no I tried your command. it does not do what I want. it just sort values based on first column. it does not even remove duplicates
– zara
Sep 9 '15 at 1:09
I understand, now. Are you opposed to a perl script?
– Jeff Schaller
Sep 9 '15 at 1:20
Does each column has fixed width in characters?
– yaegashi
Sep 9 '15 at 1:22
|
show 9 more comments
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I have a data file with 10,000 columns and 117,000 rows. my original data has a lot of repetition within each columns. it is like:
inputfile.txt :
123 124 111
321 124 111
123 000 111
123 111 222
I want to keep one copy of each value within each column like:
123 124 111
321 000 222
111
I need a program to do all columns together since I have 10,000 columns.
text-processing columns
I have a data file with 10,000 columns and 117,000 rows. my original data has a lot of repetition within each columns. it is like:
inputfile.txt :
123 124 111
321 124 111
123 000 111
123 111 222
I want to keep one copy of each value within each column like:
123 124 111
321 000 222
111
I need a program to do all columns together since I have 10,000 columns.
text-processing columns
text-processing columns
edited 2 days ago
Rui F Ribeiro
38.2k1475125
38.2k1475125
asked Sep 9 '15 at 0:20
zara
6241417
6241417
I am confused by your sample command and the input & output files. That command on that input file does not produce the given output. Can you explain how you translate the given input to the given output, or does the sample command do what you want to do (just stopping short of all 10,000 columns) ?
– Jeff Schaller
Sep 9 '15 at 0:39
If the given command does what you want, then the answer may be as simple as:sort input.txt | uniq > output.txt
assuming you don't care if the input is re-ordered; there are ways around that requirement, if needed.
– Jeff Schaller
Sep 9 '15 at 0:40
no I tried your command. it does not do what I want. it just sort values based on first column. it does not even remove duplicates
– zara
Sep 9 '15 at 1:09
I understand, now. Are you opposed to a perl script?
– Jeff Schaller
Sep 9 '15 at 1:20
Does each column has fixed width in characters?
– yaegashi
Sep 9 '15 at 1:22
|
show 9 more comments
I am confused by your sample command and the input & output files. That command on that input file does not produce the given output. Can you explain how you translate the given input to the given output, or does the sample command do what you want to do (just stopping short of all 10,000 columns) ?
– Jeff Schaller
Sep 9 '15 at 0:39
If the given command does what you want, then the answer may be as simple as:sort input.txt | uniq > output.txt
assuming you don't care if the input is re-ordered; there are ways around that requirement, if needed.
– Jeff Schaller
Sep 9 '15 at 0:40
no I tried your command. it does not do what I want. it just sort values based on first column. it does not even remove duplicates
– zara
Sep 9 '15 at 1:09
I understand, now. Are you opposed to a perl script?
– Jeff Schaller
Sep 9 '15 at 1:20
Does each column has fixed width in characters?
– yaegashi
Sep 9 '15 at 1:22
I am confused by your sample command and the input & output files. That command on that input file does not produce the given output. Can you explain how you translate the given input to the given output, or does the sample command do what you want to do (just stopping short of all 10,000 columns) ?
– Jeff Schaller
Sep 9 '15 at 0:39
I am confused by your sample command and the input & output files. That command on that input file does not produce the given output. Can you explain how you translate the given input to the given output, or does the sample command do what you want to do (just stopping short of all 10,000 columns) ?
– Jeff Schaller
Sep 9 '15 at 0:39
If the given command does what you want, then the answer may be as simple as:
sort input.txt | uniq > output.txt
assuming you don't care if the input is re-ordered; there are ways around that requirement, if needed.– Jeff Schaller
Sep 9 '15 at 0:40
If the given command does what you want, then the answer may be as simple as:
sort input.txt | uniq > output.txt
assuming you don't care if the input is re-ordered; there are ways around that requirement, if needed.– Jeff Schaller
Sep 9 '15 at 0:40
no I tried your command. it does not do what I want. it just sort values based on first column. it does not even remove duplicates
– zara
Sep 9 '15 at 1:09
no I tried your command. it does not do what I want. it just sort values based on first column. it does not even remove duplicates
– zara
Sep 9 '15 at 1:09
I understand, now. Are you opposed to a perl script?
– Jeff Schaller
Sep 9 '15 at 1:20
I understand, now. Are you opposed to a perl script?
– Jeff Schaller
Sep 9 '15 at 1:20
Does each column has fixed width in characters?
– yaegashi
Sep 9 '15 at 1:22
Does each column has fixed width in characters?
– yaegashi
Sep 9 '15 at 1:22
|
show 9 more comments
1 Answer
1
active
oldest
votes
up vote
1
down vote
This should do what you require in 5 lines of code (2 of which are just tidying):
#!/bin/bash
# run this, specifying input file as $1 (parameter 1)
# delete any pre-existing column files from /tmp
find /tmp -maxdepth 1 -name "column*" -delete
# create /tmp/columnN files - each file holds one column of $1
awk '{for (f=1; f<=NF; f++) {print $f >>"/tmp/column"f}}' "$1"
# iterate through column files, sorting and removing duplicates
find /tmp -maxdepth 1 -name "column*" -execdir sort -o {} -u {} ;
# re-combine columns and output to stdout
paste /tmp/column*
# delete column files from /tmp
find /tmp -maxdepth 1 -name "column*" -delete
It is possible that with a very large number of columns (as you have) the paste command will fail because /tmp/column* cannot be fully expanded.
A difference in output from your example is that each column's output is sorted whereas in your original the 2nd column was unsorted.
@ gogoud- how should I excute this code? my input file name is hap.txt . where should I put my input and output file? should I replace my input file name instead of -name in your code?
– zara
Sep 10 '15 at 16:32
@ramin: save my code as a file let's say as 'sorter.sh', then make it executablechmod +x ./sorter.sh
and then run it supplying your file as the parameter:./sorter.sh /path/to/hap.txt >/tmp/output.txt
- this will save the output to a new file /tmp/output.txt.
– gogoud
Sep 11 '15 at 17:06
@gogoud : I tried to run it but I got this error. could you run it once?skarimi@signal[18:57][~/mkhap]$ ./sorter.sh hap.txt > sorteroutput.txt -bash: ./sorter.sh: Permission denied skarimi@signal[18:57][~/mkhap]$
– zara
Sep 11 '15 at 22:54
@done_crissti: I get this error now: skarimi@signal[20:08][~/mkhap/new]$ ./sorter.sh hap.txt > /tmp/sorteroutput.txt find: The current directory is included in the PATH environment variable, which is insecure in combination with the -execdir action of find. Please remove the current directory from your $PATH (that is, remove "." or leading or trailing colons) paste: /tmp/column4683: Too many open files skarimi@signal[20:10][~/mkhap/new]$ why is that?
– zara
Sep 12 '15 at 0:11
@gogoud: I get this error now: skarimi@signal[20:08][~/mkhap/new]$ ./sorter.sh hap.txt > /tmp/sorteroutput.txt find: The current directory is included in the PATH environment variable, which is insecure in combination with the -execdir action of find. Please remove the current directory from your $PATH (that is, remove "." or leading or trailing colons) paste: /tmp/column4683: Too many open files skarimi@signal[20:10][~/mkhap/new]$ why is that?
– zara
Sep 12 '15 at 0:16
|
show 2 more comments
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
This should do what you require in 5 lines of code (2 of which are just tidying):
#!/bin/bash
# run this, specifying input file as $1 (parameter 1)
# delete any pre-existing column files from /tmp
find /tmp -maxdepth 1 -name "column*" -delete
# create /tmp/columnN files - each file holds one column of $1
awk '{for (f=1; f<=NF; f++) {print $f >>"/tmp/column"f}}' "$1"
# iterate through column files, sorting and removing duplicates
find /tmp -maxdepth 1 -name "column*" -execdir sort -o {} -u {} ;
# re-combine columns and output to stdout
paste /tmp/column*
# delete column files from /tmp
find /tmp -maxdepth 1 -name "column*" -delete
It is possible that with a very large number of columns (as you have) the paste command will fail because /tmp/column* cannot be fully expanded.
A difference in output from your example is that each column's output is sorted whereas in your original the 2nd column was unsorted.
@ gogoud- how should I excute this code? my input file name is hap.txt . where should I put my input and output file? should I replace my input file name instead of -name in your code?
– zara
Sep 10 '15 at 16:32
@ramin: save my code as a file let's say as 'sorter.sh', then make it executablechmod +x ./sorter.sh
and then run it supplying your file as the parameter:./sorter.sh /path/to/hap.txt >/tmp/output.txt
- this will save the output to a new file /tmp/output.txt.
– gogoud
Sep 11 '15 at 17:06
@gogoud : I tried to run it but I got this error. could you run it once?skarimi@signal[18:57][~/mkhap]$ ./sorter.sh hap.txt > sorteroutput.txt -bash: ./sorter.sh: Permission denied skarimi@signal[18:57][~/mkhap]$
– zara
Sep 11 '15 at 22:54
@done_crissti: I get this error now: skarimi@signal[20:08][~/mkhap/new]$ ./sorter.sh hap.txt > /tmp/sorteroutput.txt find: The current directory is included in the PATH environment variable, which is insecure in combination with the -execdir action of find. Please remove the current directory from your $PATH (that is, remove "." or leading or trailing colons) paste: /tmp/column4683: Too many open files skarimi@signal[20:10][~/mkhap/new]$ why is that?
– zara
Sep 12 '15 at 0:11
@gogoud: I get this error now: skarimi@signal[20:08][~/mkhap/new]$ ./sorter.sh hap.txt > /tmp/sorteroutput.txt find: The current directory is included in the PATH environment variable, which is insecure in combination with the -execdir action of find. Please remove the current directory from your $PATH (that is, remove "." or leading or trailing colons) paste: /tmp/column4683: Too many open files skarimi@signal[20:10][~/mkhap/new]$ why is that?
– zara
Sep 12 '15 at 0:16
|
show 2 more comments
up vote
1
down vote
This should do what you require in 5 lines of code (2 of which are just tidying):
#!/bin/bash
# run this, specifying input file as $1 (parameter 1)
# delete any pre-existing column files from /tmp
find /tmp -maxdepth 1 -name "column*" -delete
# create /tmp/columnN files - each file holds one column of $1
awk '{for (f=1; f<=NF; f++) {print $f >>"/tmp/column"f}}' "$1"
# iterate through column files, sorting and removing duplicates
find /tmp -maxdepth 1 -name "column*" -execdir sort -o {} -u {} ;
# re-combine columns and output to stdout
paste /tmp/column*
# delete column files from /tmp
find /tmp -maxdepth 1 -name "column*" -delete
It is possible that with a very large number of columns (as you have) the paste command will fail because /tmp/column* cannot be fully expanded.
A difference in output from your example is that each column's output is sorted whereas in your original the 2nd column was unsorted.
@ gogoud- how should I excute this code? my input file name is hap.txt . where should I put my input and output file? should I replace my input file name instead of -name in your code?
– zara
Sep 10 '15 at 16:32
@ramin: save my code as a file let's say as 'sorter.sh', then make it executablechmod +x ./sorter.sh
and then run it supplying your file as the parameter:./sorter.sh /path/to/hap.txt >/tmp/output.txt
- this will save the output to a new file /tmp/output.txt.
– gogoud
Sep 11 '15 at 17:06
@gogoud : I tried to run it but I got this error. could you run it once?skarimi@signal[18:57][~/mkhap]$ ./sorter.sh hap.txt > sorteroutput.txt -bash: ./sorter.sh: Permission denied skarimi@signal[18:57][~/mkhap]$
– zara
Sep 11 '15 at 22:54
@done_crissti: I get this error now: skarimi@signal[20:08][~/mkhap/new]$ ./sorter.sh hap.txt > /tmp/sorteroutput.txt find: The current directory is included in the PATH environment variable, which is insecure in combination with the -execdir action of find. Please remove the current directory from your $PATH (that is, remove "." or leading or trailing colons) paste: /tmp/column4683: Too many open files skarimi@signal[20:10][~/mkhap/new]$ why is that?
– zara
Sep 12 '15 at 0:11
@gogoud: I get this error now: skarimi@signal[20:08][~/mkhap/new]$ ./sorter.sh hap.txt > /tmp/sorteroutput.txt find: The current directory is included in the PATH environment variable, which is insecure in combination with the -execdir action of find. Please remove the current directory from your $PATH (that is, remove "." or leading or trailing colons) paste: /tmp/column4683: Too many open files skarimi@signal[20:10][~/mkhap/new]$ why is that?
– zara
Sep 12 '15 at 0:16
|
show 2 more comments
up vote
1
down vote
up vote
1
down vote
This should do what you require in 5 lines of code (2 of which are just tidying):
#!/bin/bash
# run this, specifying input file as $1 (parameter 1)
# delete any pre-existing column files from /tmp
find /tmp -maxdepth 1 -name "column*" -delete
# create /tmp/columnN files - each file holds one column of $1
awk '{for (f=1; f<=NF; f++) {print $f >>"/tmp/column"f}}' "$1"
# iterate through column files, sorting and removing duplicates
find /tmp -maxdepth 1 -name "column*" -execdir sort -o {} -u {} ;
# re-combine columns and output to stdout
paste /tmp/column*
# delete column files from /tmp
find /tmp -maxdepth 1 -name "column*" -delete
It is possible that with a very large number of columns (as you have) the paste command will fail because /tmp/column* cannot be fully expanded.
A difference in output from your example is that each column's output is sorted whereas in your original the 2nd column was unsorted.
This should do what you require in 5 lines of code (2 of which are just tidying):
#!/bin/bash
# run this, specifying input file as $1 (parameter 1)
# delete any pre-existing column files from /tmp
find /tmp -maxdepth 1 -name "column*" -delete
# create /tmp/columnN files - each file holds one column of $1
awk '{for (f=1; f<=NF; f++) {print $f >>"/tmp/column"f}}' "$1"
# iterate through column files, sorting and removing duplicates
find /tmp -maxdepth 1 -name "column*" -execdir sort -o {} -u {} ;
# re-combine columns and output to stdout
paste /tmp/column*
# delete column files from /tmp
find /tmp -maxdepth 1 -name "column*" -delete
It is possible that with a very large number of columns (as you have) the paste command will fail because /tmp/column* cannot be fully expanded.
A difference in output from your example is that each column's output is sorted whereas in your original the 2nd column was unsorted.
edited Sep 10 '15 at 15:35
answered Sep 10 '15 at 7:19
gogoud
1,680716
1,680716
@ gogoud- how should I excute this code? my input file name is hap.txt . where should I put my input and output file? should I replace my input file name instead of -name in your code?
– zara
Sep 10 '15 at 16:32
@ramin: save my code as a file let's say as 'sorter.sh', then make it executablechmod +x ./sorter.sh
and then run it supplying your file as the parameter:./sorter.sh /path/to/hap.txt >/tmp/output.txt
- this will save the output to a new file /tmp/output.txt.
– gogoud
Sep 11 '15 at 17:06
@gogoud : I tried to run it but I got this error. could you run it once?skarimi@signal[18:57][~/mkhap]$ ./sorter.sh hap.txt > sorteroutput.txt -bash: ./sorter.sh: Permission denied skarimi@signal[18:57][~/mkhap]$
– zara
Sep 11 '15 at 22:54
@done_crissti: I get this error now: skarimi@signal[20:08][~/mkhap/new]$ ./sorter.sh hap.txt > /tmp/sorteroutput.txt find: The current directory is included in the PATH environment variable, which is insecure in combination with the -execdir action of find. Please remove the current directory from your $PATH (that is, remove "." or leading or trailing colons) paste: /tmp/column4683: Too many open files skarimi@signal[20:10][~/mkhap/new]$ why is that?
– zara
Sep 12 '15 at 0:11
@gogoud: I get this error now: skarimi@signal[20:08][~/mkhap/new]$ ./sorter.sh hap.txt > /tmp/sorteroutput.txt find: The current directory is included in the PATH environment variable, which is insecure in combination with the -execdir action of find. Please remove the current directory from your $PATH (that is, remove "." or leading or trailing colons) paste: /tmp/column4683: Too many open files skarimi@signal[20:10][~/mkhap/new]$ why is that?
– zara
Sep 12 '15 at 0:16
|
show 2 more comments
@ gogoud- how should I excute this code? my input file name is hap.txt . where should I put my input and output file? should I replace my input file name instead of -name in your code?
– zara
Sep 10 '15 at 16:32
@ramin: save my code as a file let's say as 'sorter.sh', then make it executablechmod +x ./sorter.sh
and then run it supplying your file as the parameter:./sorter.sh /path/to/hap.txt >/tmp/output.txt
- this will save the output to a new file /tmp/output.txt.
– gogoud
Sep 11 '15 at 17:06
@gogoud : I tried to run it but I got this error. could you run it once?skarimi@signal[18:57][~/mkhap]$ ./sorter.sh hap.txt > sorteroutput.txt -bash: ./sorter.sh: Permission denied skarimi@signal[18:57][~/mkhap]$
– zara
Sep 11 '15 at 22:54
@done_crissti: I get this error now: skarimi@signal[20:08][~/mkhap/new]$ ./sorter.sh hap.txt > /tmp/sorteroutput.txt find: The current directory is included in the PATH environment variable, which is insecure in combination with the -execdir action of find. Please remove the current directory from your $PATH (that is, remove "." or leading or trailing colons) paste: /tmp/column4683: Too many open files skarimi@signal[20:10][~/mkhap/new]$ why is that?
– zara
Sep 12 '15 at 0:11
@gogoud: I get this error now: skarimi@signal[20:08][~/mkhap/new]$ ./sorter.sh hap.txt > /tmp/sorteroutput.txt find: The current directory is included in the PATH environment variable, which is insecure in combination with the -execdir action of find. Please remove the current directory from your $PATH (that is, remove "." or leading or trailing colons) paste: /tmp/column4683: Too many open files skarimi@signal[20:10][~/mkhap/new]$ why is that?
– zara
Sep 12 '15 at 0:16
@ gogoud- how should I excute this code? my input file name is hap.txt . where should I put my input and output file? should I replace my input file name instead of -name in your code?
– zara
Sep 10 '15 at 16:32
@ gogoud- how should I excute this code? my input file name is hap.txt . where should I put my input and output file? should I replace my input file name instead of -name in your code?
– zara
Sep 10 '15 at 16:32
@ramin: save my code as a file let's say as 'sorter.sh', then make it executable
chmod +x ./sorter.sh
and then run it supplying your file as the parameter: ./sorter.sh /path/to/hap.txt >/tmp/output.txt
- this will save the output to a new file /tmp/output.txt.– gogoud
Sep 11 '15 at 17:06
@ramin: save my code as a file let's say as 'sorter.sh', then make it executable
chmod +x ./sorter.sh
and then run it supplying your file as the parameter: ./sorter.sh /path/to/hap.txt >/tmp/output.txt
- this will save the output to a new file /tmp/output.txt.– gogoud
Sep 11 '15 at 17:06
@gogoud : I tried to run it but I got this error. could you run it once?skarimi@signal[18:57][~/mkhap]$ ./sorter.sh hap.txt > sorteroutput.txt -bash: ./sorter.sh: Permission denied skarimi@signal[18:57][~/mkhap]$
– zara
Sep 11 '15 at 22:54
@gogoud : I tried to run it but I got this error. could you run it once?skarimi@signal[18:57][~/mkhap]$ ./sorter.sh hap.txt > sorteroutput.txt -bash: ./sorter.sh: Permission denied skarimi@signal[18:57][~/mkhap]$
– zara
Sep 11 '15 at 22:54
@done_crissti: I get this error now: skarimi@signal[20:08][~/mkhap/new]$ ./sorter.sh hap.txt > /tmp/sorteroutput.txt find: The current directory is included in the PATH environment variable, which is insecure in combination with the -execdir action of find. Please remove the current directory from your $PATH (that is, remove "." or leading or trailing colons) paste: /tmp/column4683: Too many open files skarimi@signal[20:10][~/mkhap/new]$ why is that?
– zara
Sep 12 '15 at 0:11
@done_crissti: I get this error now: skarimi@signal[20:08][~/mkhap/new]$ ./sorter.sh hap.txt > /tmp/sorteroutput.txt find: The current directory is included in the PATH environment variable, which is insecure in combination with the -execdir action of find. Please remove the current directory from your $PATH (that is, remove "." or leading or trailing colons) paste: /tmp/column4683: Too many open files skarimi@signal[20:10][~/mkhap/new]$ why is that?
– zara
Sep 12 '15 at 0:11
@gogoud: I get this error now: skarimi@signal[20:08][~/mkhap/new]$ ./sorter.sh hap.txt > /tmp/sorteroutput.txt find: The current directory is included in the PATH environment variable, which is insecure in combination with the -execdir action of find. Please remove the current directory from your $PATH (that is, remove "." or leading or trailing colons) paste: /tmp/column4683: Too many open files skarimi@signal[20:10][~/mkhap/new]$ why is that?
– zara
Sep 12 '15 at 0:16
@gogoud: I get this error now: skarimi@signal[20:08][~/mkhap/new]$ ./sorter.sh hap.txt > /tmp/sorteroutput.txt find: The current directory is included in the PATH environment variable, which is insecure in combination with the -execdir action of find. Please remove the current directory from your $PATH (that is, remove "." or leading or trailing colons) paste: /tmp/column4683: Too many open files skarimi@signal[20:10][~/mkhap/new]$ why is that?
– zara
Sep 12 '15 at 0:16
|
show 2 more comments
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f228436%2fhow-to-extract-unique-values-within-columns%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I am confused by your sample command and the input & output files. That command on that input file does not produce the given output. Can you explain how you translate the given input to the given output, or does the sample command do what you want to do (just stopping short of all 10,000 columns) ?
– Jeff Schaller
Sep 9 '15 at 0:39
If the given command does what you want, then the answer may be as simple as:
sort input.txt | uniq > output.txt
assuming you don't care if the input is re-ordered; there are ways around that requirement, if needed.– Jeff Schaller
Sep 9 '15 at 0:40
no I tried your command. it does not do what I want. it just sort values based on first column. it does not even remove duplicates
– zara
Sep 9 '15 at 1:09
I understand, now. Are you opposed to a perl script?
– Jeff Schaller
Sep 9 '15 at 1:20
Does each column has fixed width in characters?
– yaegashi
Sep 9 '15 at 1:22