I've the following awk
command:
awk -F ' ' '{ print $NF }' log filename
And it gives the output as below:
06:00:00
parameters:
SDS
(2)
no
no
no
no
doc=4000000000).
information:
0
5898
5898
06:06:25
The problem is I need to save this in an array.
For example when I print or echo $array[0]
I should get 06:00:00
and similarly
$array[1] = parameters:
.
.
.
$array[n] = 06:06:25
My end goal is to print them using a print statement i.e
printf("start time: %d and end time: %d", array[0], array[n]")
Output
start time:06:00:00 and end time:06:06:25
awk
has arrays, why do you need to use ksh arrays? – Stéphane Chazelas Oct 08 '13 at 16:40