I want to create a matrix in a bash /awk script in order to save some statistics about user activity (the statistics are stored in log files)
how can i have matrix in bash script language (or maybe using awk)?

is it possible to write something like?

matrix[n]
matrix[1]=$2
a=expr 'matrix[5] + 2'

e.t.c.

thank you all

I want to create a matrix in a bash /awk script in order to save some statistics about user activity (the statistics are stored in log files)
how can i have matrix in bash script language (or maybe using awk)?

is it possible to write something like?

matrix[n]
matrix[1]=$2
a=expr 'matrix[5] + 2'

e.t.c.

thank you all

found it
i just have to do something like $mat[1,1]=$3
using awk

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.