#!/bin/sh # Remove any $1 or */$1 from the argument list if [ $# = 0 ] ; then echo no_sample word argument list else WORD=$1 shift while [ "$1" != "" ] do case $1 in $WORD|*/$WORD) ;; *) echo $1 ;; esac shift done fi