Design patterns for shell scripts