I am operating with the multiple column data: ID,num,score
7LMQ,Y6G,1.99
7LAA,Y65,2.95
7LZZ,Y55,8.106
7LDD,YAA,9.063
7N66,0HG,6.042
7444,HOP,5.02
7LJF,HEI,5.14
7LFD,LAL,4.128
7KCV,Cho,4.31
7GHJ,Ro,9.045
using some simple script I need to create two bash arrays from this data:
a simple array containing elemements from the second column:
sdf_lists=("Y6G" "Y65" "Y55" "YAA" "0HG" "HOP" "HEI" "LAL" "Cho" "Ro")
an associative array made from the elements of the 2nd and the 1st columns:
dataset=( [Y6G]=7LMQ [Y65]=7LAA [Y55]=7LZZ [YAA]=7LDD [0HG]=7N66 [HOP]=7444 [HEI]=7LJF [LAL]=7LFD [Cho]=7KCV [Ro]=7GHj ).
Do I need something complex like AWK to achive it or simple GREP solution will work as well?