ls *.* | shuf -n 10 >> exclude_this.list
 
XGREP=`cat exclude_this.list | sed ':a;N;$!ba;s/\n/|/g'` echo $XGREP

Now you can use egrep -v "$XGREP".