X-Git-Url: http://www.club.cc.cmu.edu/~cmccabe/cgi-bin/gitweb.cgi?p=cmccabe-bin;a=blobdiff_plain;f=ff;fp=ff;h=d4eddc7a4204cb25b0b13221adfd6479529f012c;hp=0000000000000000000000000000000000000000;hb=b4fb215cf428f1fd85c15d29c5d3b6cfcca2e039;hpb=2e66020a9ca5261c67858f7378f39684827bc7ca diff --git a/ff b/ff new file mode 100755 index 0000000..d4eddc7 --- /dev/null +++ b/ff @@ -0,0 +1,16 @@ +#!/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