Introduction
Introduction Statistics Contact Development Disclaimer Help
tcookwhat - recipes - various cooking recipes
git clone git://src.adamsgaard.dk/recipes
Log
Files
Refs
Submodules
---
tcookwhat (378B)
---
1 #!/bin/sh
2 # Pass a series of ingredients as arguments to this script, and it
3 # will print all files that contain them.
4 cmd="find . \( -name '*.md' -o -name '*.txt' \) -type f"
5 i=0
6 for a in "$@"; do
7 i=$((i + 1))
8 if test "$i" -lt "$#"; then
9 grepflags="-qiE"
10 else
11 grepflags="-liE"
12 fi
13 cmd="${cmd} -exec grep ${grepflags} '^- .*${a}' {} \;"
14 done
15 eval "$cmd | sed 's,^./,,'"
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.