Suppose such a minimal task to select elements in B but not in A
file_list1=(a.sh b.sh c.sh)
file_list2=(b.sh c.sh d.sh)
for i in files_list1; do
for k in files_list2; do
if [[ $k in $(echo $i) ]]; then
echo
else
echo $k
fi
done
done
it report errors:
$ bash compare.sh
compare.sh: line 5: conditional binary operator expected
compare.sh: line 5: syntax error near `in'
compare.sh: line 5: ` if [[ $k in $(echo $i) ]]; then'
if not apply in
, how could get the code working?