SMOLNET PORTAL home about changes
tcookwhat - recipes - various cooking recipes
(URL) git clone git://src.adamsgaard.dk/recipes (git://src.adamsgaard.dk)
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Submodules
---
tcookwhat (356B)
---
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 . -iname '*.md' -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,^./,,'"
Response: application/gopher-menu
Original URLgopher://adamsgaard.dk/1/src/recipes/file/cookwhat.gph
Content-Typeapplication/gopher-menu; charset=utf-8