Advertisement
Guest User

Untitled

a guest
Jul 26th, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. while read index fruit
  4. do
  5. data[$index]="${data[index]} $fruit"
  6. done < fruit.txt
  7.  
  8. while read one two
  9. do
  10. for fruit1 in ${data[$one]}
  11. do
  12. for fruit2 in ${data[$two]}
  13. do
  14. echo $fruit1 $fruit2
  15. done
  16. done
  17. done < list.txt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement