#!../soft/perl/bin/perl
#ident "%W%"
#format data file
my ($inputfile)=$ARGV[0];
my ($outfile)=$ARGV[1];
&getDatas();
sub getDatas{
#column size 5,2,2,2,6,8,5,15,1,30,30,10,10,10,8,23,20,2,4
#data size 5,2,2,2,6,8,5,20,1,30,30,3,10,10,8,26,20,2,4
@clmsLen=(5,2,2,2,6,8,5,20,1,30,30,3,10,10,8,26,20,2,4);
open(IN,">$outfile");
open(DATA,"$inputfile") || die "Required file not found \n";
while($input = <DATA>){
chomp($input);
$pos=0;
$result="";
foreach $len(@clmsLen){
$result .= substr($input,$pos,$len) . "|";
$pos=$pos+$len;
}
$result .="\n";
printf IN $result;
}
close(IN);
close(DATA);
}
分享到:
相关推荐
spark 机器学习使用的例子数据,sample_libsvm_data.txt
a sample program of sent data to internet by simulate explore
Opencv samples data file,shape_sample,Blender_Suzanne1..
spark 机器学习使用的例子数据
criteo_sampled_data.csv
This article investigates sampled-data vehicular platoon control with communication delay. A new sampled-data control method is established, in which the effect of the communication delay is involved....
精品数据集,用作研究和毕设使用
autoware:the sample 3D pointcloud/vector map data.
a simple sample for imageSwitcher
MP4中关于 sample format的文档
pentaho 社区版的数据库在换到mysql以后,缺少sample data数据库的创建语句,这个sql就是用来做这件事的。
file input and output
This sample shows how to create, read, write, copy and delete a file, how to retrieve file properties, and how to track a file or folder so that your app can access it again. This sample uses Windows....
NULL 博文链接:https://wfzgsm.iteye.com/blog/2001012
the sample of dll
sample of function spec
Chen Tongwen,Francis Bruce. December 1994
Test sample data of ten tags on 2D random distribution.xlsx
improvement of support vector data description
dhtml file upload sample code server side and client side