Bash Multiple Array script

Job ID: 34775088

Budget: $30 – $250 USD

I need a quick turn around, this will be one of the first things I ask is how long to complete this.

I need a bash script to loop through some data for me, I assumed a simple function based off of data in an array but it may not be that easy as there is a catch.

Requirements:
1. I have 14 categories
2. I have 7 variables per category

categories = a - n
variables = 1 - 7

where CATEGORY = name of category
variable1 ="$(tac /mnt/data/systemlogs/logstash/logs/pipeline_CATEGORY_pipeline.log | grep logstash.inputs.jdbc -m 1 | grep -Eo '[[:digit:]]{4}-[[:digit:]]{2}-[[:digit:]]{2}T[[:digit:]]{2}:[[:digit:]]{2}:[[:digit:]]{2}')"

variable2="$(curl -s -XGET -k $login $u/cdm_CATEGORY_current/_search | grep -Eo '@timestamp\"\:\"[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{2}' | tail -n1 | grep -Eo '[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}')"

variable3="$(TZ=EASTERN date -d $VARIABLE1 +%m-%d' '%k:%m:%S)"

variable4="$(TZ=UTC date -d $VARIABLE2 +%m-%d' '%k:%m:%S)"

variable5="$(TZ=EASTERN date -d $VARIABLE1 +%s)"

variable6="$(TZ=UTC date -d $VARIABLE2 +%s)"

variable7="$(($VARIABLE6-$VARIABLE5))"

***** PLEASE READ THIS!

Secondary issue. Category n variable 2 will be n_1. Literally nothing I can do about that though


GIVING 2 examples here.
Category b variable 1 would be
variable1 ="$(tac /mnt/data/systemlogs/logstash/logs/pipeline_b_pipeline.log | grep logstash.inputs.jdbc -m 1 | grep -Eo '[[:digit:]]{4}-[[:digit:]]{2}-[[:digit:]]{2}T[[:digit:]]{2}:[[:digit:]]{2}:[[:digit:]]{2}')"

Example 2: Category n variable 2
variable2="$(curl -s -XGET -k $login $u/cdm_n_1_current/_search | grep -Eo '@timestamp\"\:\"[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{2}' | tail -n1 | grep -Eo '[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}')"

These need set like that as I have to use those values later on in the code. There are times these variables (I wrote) could change, which means it would be easiest in an array or something like that I would change only minimal things.
Related categories: Shell Script Bash Scripting Bash