I have very limited knowledge of bash coding.
I have some data stored in a text file in the following format (picture attached). Each line contains some text and a list of numbers. Each of the entries are separated by a tab.
The texts from each line should go to respective variables. For line-1:
$var_1='SomeText', $var_2='(Sometext)', $var_3='myLabel1' etc. Numbers following the texts should be treated as array entries. For line-1, Number_array=[2,0,-1,-2]
Afterwards I want to do something like this:
for each line:
for i=0 to length(Number_array)-1:
$a=Number_array[i]
$b=Number_array[i+1]
<Some other code>
end inner loop
end outer loop

cat -Twhen you have tabs so we can see them). 2. Have a look at awk.awk. Check out the Awk Tutorial. Good luck.bash, then something likewhile read var1 var2 var3 var4 num1 num2 num3 num4 any_remaing_values ; do printf "%s.......%s\n", $var1, .... $num4 ; done < inputFilewould be the place to start. You can search here for[bash] while readand get much more detail. You'll need to understand howprintfand it's format string and format specifiers work. I'd recommend Awk printf tutorial for that. There are tiny differences when usingprintfinbashvsawk, so do small tests first.Good Luck