#!/usr/bin/env bash # # find first # # Prints out the first file which matches the given pattern in the current directory subtree. # die() { echo $@ exit 1 } [[ $# == 1 ]] || die "You must specify exactly one argument" TOFIND=$1 exec find . -name '*'${TOFIND}'*' -print -quit