fork download
  1. tr '_' ','| awk 'BEGIN{FS=","}
  2. {if(($3>10)&&($1=="tb"))
  3. {print $1"-"$2"-"$3;count=count+1;}
  4. }
  5. END{
  6. if(count==0){
  7. print "No medicines found with greater than 10 numers in a strip"}
  8. }'
Success #stdin #stdout 0s 4732KB
stdin
SP_123423,Montek,75
SP_714441,Forocot,105
TB_006745_10,Concor,250
TB_102030_25,Ivabid,325
tb_100011_15,Zetamit,150
stdout
tb-100011-15