#/bin/bash TMP_FIL="/tmp/bgrep_$(date +%F%H%M%S)" if [ $# -eq 3 ] then grep -A3 -B3 -n $1 $3 > ${TMP_FIL} grep -n $2 $3 >> ${TMP_FIL} sort -n ${TMP_FIL} | sed 's/^[[:digit:]]*[-|:]//' else echo "$0 ord1 ord2 filnamn" fi