projects
/
migration-tools.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
m_insert_tag for kmig
[migration-tools.git]
/
text
/
fix_split_csv
1
#!/usr/bin/perl
2
3
my $delimiter = "\t";
4
my $colcount = 11;
5
6
my $running_field_count = 0;
7
8
while (my $line = <>) {
9
chomp $line;
10
print $line;
11
my @f = split /$delimiter/, $line;
12
if (scalar(@f) != 1) {
13
$running_field_count += scalar(@f);
14
}
15
if ($running_field_count >= $colcount) {
16
$running_field_count = 0;
17
print "\n";
18
}
19
}
20