--- プログラム ---

BEGIN{

rn=1
while(getline < "./data/csvdata.csv" > 0)
{  
    split($0,arr2,",")
    fnmx=length(arr2)
    for(fn=1;fn<=fnmx;fn++)
    {  
        arr[rn,fn]=arr2[fn]
    }  
    rn++
} 
rn--
close("./data/csvdata.csv")

for(i=1;i<=rn;i++)
{  
    for(j=1;j<fnmx;j++)
    {  
        printf arr[i,j] ","
    }
    print arr[i,fnmx]
}  

}


--- 実行結果 ---

11,12,13,14,15
21,22,23,24,25
31,32,33,34,35
41,42,43,44,45






戻る