#!/bin/sh if [ "$0" == "foo" ]; then statement1 else if [ "$0" == "bar" ]; then statement2 else statement3 fi