Skip to content

Instantly share code, notes, and snippets.

@utaani
Created July 10, 2013 23:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save utaani/5971251 to your computer and use it in GitHub Desktop.
Save utaani/5971251 to your computer and use it in GitHub Desktop.
LTSVのラベルをはずしてTSVに変換。cutとかで処理しやすいように。
#!/usr/bin/perl
my $line;
my $param;
my @params;
while($line=<STDIN>) {
my @keys;
my @vals;
chomp($line);
@params=split(/\t/,$line);
foreach $param (@params) {
my($key,$val)=split(/:/,$param,2);
push @keys,$key;
push @vals,$val;
}
print join("\t",@vals)."\n";
}
exit;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment