I have an excel file and column 10 has multiple values like below,
Designation Header
-----------------
Student
Teacher
Teacher
Organization Director
Organization Director
Organization Head
Student
Organization Head
Organization Director
Teacher
I am trying to get the unique values from this column and the number of rows corresponding to each unique value in an associative array.
Here is the command I am using to get the unique value and number of rows,
awk -F',' 'NR>1{print $10}' Sorted_File.csv | sort | uniq -c
This gives me output as below,
2 Student
3 Teacher
3 Organization Director
2 Organization Head
How do I save this output in an associative array i.e key-value pair?
shdoesn't have associate arrays.... are you targeting bash or zsh?