Last active
October 28, 2016 20:00
-
-
Save gnosek/eeb60962460cb0e3c921d3fbde23234c to your computer and use it in GitHub Desktop.
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=(foo bar baz quux) | |
LIST2=(aaa bbb ccc ddd) | |
LIST3=(eee fff ggg hhh) | |
for i in LIST{1..3}[@] | |
do | |
echo ${!i} | grep -q bbb && echo $i | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment