There's a lot of similar questions, but I couldn't find one that fixed my problem. It's possible I don't know what to google.
I'm trying to create a pair of arrays and then loop through both by index. The contents of the array is generated from this command:
$ cat small | grep -Po "(?<=Query: ).+$" | grep -v "use"
select count(*) from batting_small
select count(*) from batting_small_parquet
select count(*) from batting_small_parquet_stats
select yearid, count(*) from batting_small_parquet group by yearId
select yearid, count(*) from batting_small_parquet_stats group by yearId
select min(hr), max(hr) from batting_small
select min(hr), max(hr) from batting_small_parquet
select min(hr), max(hr) from batting_small_parquet_stats
...
But making an array like this
queries=( ` cat small | grep -Po "(?<=Query: ).+$" | grep -v "use" ` )
Splits by word and not by line. How can I split by line?