ormaaj 1337315647 learn #redirect faq36 ormaaj 1337315691 forget kerframil 1544612684 learn intersect() { local x; declare -A map; while (( $# )); [[ $1 != -- ]]; do map[$1]=1; shift; done; shift; for x; do (( ++map[\$x] == 2 )) && printf '%s\n' "$x"; done }; intersect {1..10} -- {5..15}