projects
/
cmccabe-bin
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
2e66020
)
Add ff
author
Colin P. McCabe
<cmccabe@apache.org>
Tue, 29 Nov 2022 21:07:19 +0000 (13:07 -0800)
committer
Colin P. McCabe
<cmccabe@apache.org>
Tue, 29 Nov 2022 21:07:19 +0000 (13:07 -0800)
ff
[new file with mode: 0755]
patch
|
blob
diff --git a/ff
b/ff
new file mode 100755
(executable)
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