This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
list1=("l" "o" "s" "W" "i" "e" "n") | |
list2=("l" "o" "s" "e") | |
diff_list=() | |
common_list=() | |
#loop through the first list comparing an item from list1 with every item in list2 | |
for i in "${!list1[@]}"; do | |
#begin looping through list2 | |
for x in "${!list2[@]}"; do | |
#compare the two items |