Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- while read index fruit
- do
- data[$index]="${data[index]} $fruit"
- done < fruit.txt
- while read one two
- do
- for fruit1 in ${data[$one]}
- do
- for fruit2 in ${data[$two]}
- do
- echo $fruit1 $fruit2
- done
- done
- done < list.txt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement