I want to run an awk split on a value that has been pushed through an array and I was wondering what the syntax should be??
e.g. running time strings through an array and trying to examine just minutes:
12:25:30
10:15:13
08:55:23
awk '
NR==FNR{
a[NR]=$0
next
}
{
for(i=1;i<NR;i++)
split($0,a,":"); print a[2]
}'
I guess I'm wondering how to format for the subsection?? (a[i])[2] ???
edit also will this substring from the split come out of the slit function as a number? e.g. can I do math on it or will it be a 'word'? If its a word can I make it a number?