#!/bin/bash
type -pa "$@" | head -n 1 ; exit ${PIPESTATUS[0]}