Pages

mardi 27 mars 2012

asort: get the size of array after split in awk

1) In order to get the size of array after using split in awk:

set a = ss_zz_0.1

echo $a | awk '{split($0,qq,"_");n=asort(qq);print n ' 

2) to split a data file:
awk -F  ':'   '{print $1}'   filename


Aucun commentaire:

Enregistrer un commentaire