dimanche 8 septembre 2019

what does if(index(i,$2)==1 indicate

Jus come across an awk script

  awk 'BEGIN {OFS=FS} NR==FNR {a[$1]=($2" "$3);next} {for (i in a) if(index(i,$12)==1) print $0,a[$12]}'

in this script what does if(index(i,$12)==1 means. Is it indicating true/false condition on just numerical equal to 1.

Aucun commentaire:

Enregistrer un commentaire