1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#!/bin/sh E3=/usr/bin/e3 whichE3=${E3}vi if [ -f ${E3} ]; then if [ -f ${whichE3} ]; then for i in $@ do ${whichE3} $i done else echo ${whichE3}: file does not exist fi else echo "${E3}: file does not exist" fi