I am comparing two files and displaying the lines which are not similar, when I just keep
echo $(awk 'FNR==NR{f[$0]+=1; next} !($0 in f)' $file1 $file2)
I am able to get the values.
When I try to do the same by passing into array , I am getting ":command not found" error
declare -a myarr=()
myarr=$("$(awk 'FNR==NR{f[$0]+=1; next} !($0 in f)' $file1 $file2 )")
Please help , thanks in advance.
+=1? Nothing in your code uses it afterwards.