I am reading data from a file line by line and storing it to array, so that I can access later that array to compare with other files data.
Now, my input file has redundancy, how to add only unique lines to array. I need to check while adding to array itself?
Below is the code I am using to read data from file:
while read line
do
//How to check array already contains this line???
<Code to adding to array>
done <"$file"