脚本如下:
awk -v file_num=${#file_path[@]} '
> BEGIN{
> OFS="\t";
> }
> {
> if(FNR>1){a[$1][ARGIND]=$3;}
> }
>
> END{
> for(i in a){
> printf "%s\t",i
> j=1;
> while(j<file_num+1){
> printf "%s\t",a[i][j];
> j=j+1;
> }
> print "" #每一行加个换行
> }
> } ' ${file_path[@]} >./miRNA_exp_matrix.txt
-------------------------------------------------------------------------------抛出下面的错误
awk: line 6: syntax error at or near [
awk: line 14: syntax error at or near [