Сбои Java с “Не могли найти основной класс”

awk 'BEGIN{ getline; for(i=1;i<=NF;i++) hdr[i]=$i; max=-1 }
   { for(i=2; i<=NF; i+=2) 
        if($i==max) { lc=lc","$(i+1); sn=sn","hdr[i] }
        else if($i>max) { max=$i; lc=$(i+1); sn=hdr[i] }
     print $1" "lc" "sn; max=-1 }'  

Здесь это с комментариями

awk 'BEGIN{ 
       # read line 1 column-headers to an array 
       getline; for(i=1;i<=NF;i++) hdr[i]=$i
       # set max to less than zero 
       max=-1
     }
     { # processes lines 2 -> last
       # check each "sn.." field 
       for(i=2; i<=NF; i+=2) 
           if($i==max) { # this cannot occurr for 1st itteration per line  
                # append "lc" field value and "sn" header 
                #  to previous "lc" and "sn", using ","   
                lc=lc","$(i+1); sn=sn","hdr[i] 
            }
            else if($i>max) { # this must occurr on 1st itteration per line 
                # save "lc" field value and "sn" header  
                max=$i; lc=$(i+1); sn=hdr[i]  
            }
       # print output for the current line 
       print $1" "lc" "sn; 
       # set max to less than zero; ready for next line
       # max=-1 
     }

Вывод

RM1 ss1 sno1
RM2 gs2 sno3
RM3 ms3 sno2
RM4 ss4,ms4 sno1,sno2
1
08.01.2014, 01:09
1 ответ

Из сообщения об ошибке Unsupported major.minor version 51.0, Вы попытались запустить банку с последним выпуском Java?

(IIRC, Это должно быть скомпилировано с Java 1.7, но Вы выполняете более низкую версию),

1
27.01.2020, 23:53

Теги

Похожие вопросы