#! /bin/bash #member_match LISTS=`list_lists | cut -f1 -d- | xargs echo` for list in $LISTS ; do echo $list list_members $list | grep $1 done
cow:~# ./member_match "at$"
He Sells Shell Scripts to Intersect Sets is a good read. Set and multiset operations from the command line or in .sh. Rather clean, straightforward shell magic.